问题
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