Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an alarm clock app with swift?

I'm trying to create a kind of alarm clock app with the swift but I could not figure out how to set an alarm model. I've tried UILocalnotification but I don't want my users to be involved the flow of alarm app other than setting the alarm. Then tried NSTimer and NSRunloop etc. but that didn't work either since those don't work when app gets background. So is there any alternative ways to do that? Any help and suggestion would be appreciated, thanks.

like image 425
Talha ŞEKER Avatar asked Jun 17 '15 11:06

Talha ŞEKER


1 Answers

I have been doing research on this for quite some time now. But didn't find any concrete way to do it. You have to use one of the following from the list and make a logic to awake the app from the background.

enter image description here

For the alarm you can go through the blog here. It's having the details, which you can use to make a logic with UIApplicationExitsOnSuspend in info.plist file.

like image 180
MD Aslam Ansari Avatar answered Oct 23 '22 00:10

MD Aslam Ansari