Playing alarm tone in background after scheduling

强颜欢笑 提交于 2019-12-12 04:09:23

问题


i have a request to make a app , which is a alarm app ,

this app should has the capability to run the alarm song, if the app is in backgorund

But i have gone through with apple documents ,its pretty clear that . each and every app will stop execution after 3 mintes, Unless the app is in a special category

But i have a quesiton , i download this app , https://itunes.apple.com/ca/app/step-out-bed!-smart-alarm/id673120263?mt=8

this app has the capability to run its alarm tone when the app is in background , even if the app is in silent mode , how come this has the cpability to do that

have they enabled music play in background , or have they configured inifinite background expiration handler , but can this causes reject app from

i have seen dozen of solutions for this implementations , but could nt match working process for this matter , also i have contacted apple for this cause , and distribution , will update this once i get an update


回答1:


You can use UILocalNotification. App will schedule the event and it will be dispatched by the system even if app is not running.

https://developer.apple.com/library/ios/documentation/iPhone/Reference/UILocalNotification_Class/



来源:https://stackoverflow.com/questions/35054240/playing-alarm-tone-in-background-after-scheduling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!