Alarm clock app in iOS

后端 未结 4 401
粉色の甜心
粉色の甜心 2020-12-07 23:29

I have to create an alarm clock app for the iPhone in which user can set alarm time and sound. In doing so, I have used UILocalNotification to set off the alarm.

No

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 23:57

    If you enable the "Audio, AirPlay, and Picture in Picture" and "Remote notifications" Background Modes, you can use a silent push notification to wake up the device and then start playing audio, and as long as you’re playing audio you won’t be limited to 30 seconds to respond to the notification like usual. This won’t work if the app has been killed manually by the user, but if the user does that you could send a local notification asking them to re-open the app.

提交回复
热议问题