Reputation: 3714
Hello I want to the follow thing (I know that is possible in Android with AlarmManager):
I read that it is impossible to set an alarm and that I have to use UILocalNotification, but my problem is that I want to get some data from server for build a personalized message. In the case of I use UILocalNotification as "Alarm", until The user will click the notification the webservice will not be called. So, there is any way to do this? or it is impossible?
Upvotes: 0
Views: 125
Reputation: 374
1: Probably, you'll not been allowed to do so when your app is not running. however you can find your way when your app is in background. Click Here for background execution and permissions. You can build up your logic according to that.
2: Other way is to get your data from server whenever user set up alarm, and store it in your app, And trigger it after a silent push notification, whenever user look in to app.
hope it may help to build logic..
Upvotes: 0
Reputation: 6363
Possible workaround is to set alarm on your server, and when time comes to send PushNotification. That way your server will know when to start the alarm and can send some personalised message. The drawback is if user change it's time settings while your app is offline, you could possibly send alarm in wrong time.
Upvotes: 1