Reputation: 53
I have implemented Apple Push notification service. I have a requirement that I need to execute code in the device when a notification is received. When I followed the documentation, I found that there are two ways to do this
application:didReceiveRemoteNotification --> this is invoked if the app is running
application:didFinishLaunchingWithOptions--> this is invoked if the app is brought to foreground because of the alert message view button.
But my requirement is different. I need to execute code when the app is in the background and also when the device is idle. Any thought how i can do it?
Thanks -Srikanth
Upvotes: 1
Views: 457
Reputation: 6734
You cannot do this with push notifications when the app is sleeping.
Upvotes: 1