1

I am trying to develop an alarm app for iOS. I have implemented it using UILocalNotification, but the issue is that local notification will allow playing local audio for 30 seconds. So I am looking for some way to extend this playing time.

Is there any way to play online MP3 or media file while the app is in background and when the notification occur by enabling background mode to play music?

Aurora0001
  • 13,139
  • 5
  • 50
  • 53
MobX
  • 2,640
  • 7
  • 33
  • 54
  • 2
    Possible duplicate of [how do I play an alarm sound for more than 30 seconds like the alarm clock pro app?](http://stackoverflow.com/questions/6543726/how-do-i-play-an-alarm-sound-for-more-than-30-seconds-like-the-alarm-clock-pro-a) – David Gelhar Nov 17 '15 at 01:48

1 Answers1

0

There is no way to achieve this. Playing silent sound to keep the app running in background is against Apple rules and your app will be rejected (I know this by experience). Furthermore, playing audio in background eats the battery quickly.

You can try to schedule multiple notifications, but it is not a clean solution either.

Mikrasya
  • 964
  • 12
  • 21