2

I want to create a feature in my app the makes a sound every 5 seconds. The sound file is short and in order to play it every 5 seconds i use a timer.

The issue is i want to play it even if the app is in the background for a maximum time of 30 min and could also be different bpm for each user. I have used background audio mode to do it but i could find in the documentation how does playing sounds is threated by the system i dont want my app to be suspended. I only saw referance to playing music songs in the background with a player.

How can i be certain i will receive the background time needed just for playing small sounds every few seconds and not playing continues music? I was thinking about empty sound wave file but afraid apple would reject my app.

Thanks for any help i can get.

gal.orlanczyk
  • 131
  • 1
  • 7
  • Did you consireded to use local notifications. I do not no is it possible to set repeat flag. Or maybe it's possible to set several notifications with different times. – Ramis May 10 '16 at 11:36
  • Not sure about local notification but it sounds like a work around i would really prefer to play the sound using avaudioplayer or any other play that can play a sound, and be able to control the bpm and make sure it stays i the background. – gal.orlanczyk May 15 '16 at 05:19

0 Answers0