Reputation: 23
I am not a developer as much as i am a project manager, i need to know more if the following is possible to help me decide the future of a project. mainly my question is, can i trigger a certain method (function) in my application using the push notification ? so my app might be in the background (or not) and i want to send a push notification message that wakes the application and execute some piece of code. if the answer is yes, can this be done without the user interaction ? so i mean without the user clicking on the push message ? to be some kind of automated, so i send the Push notification message, the iPhone receives it and execute the code, without the use interaction ? i can set up my own APNS server if needed. i am not looking for a code as much as i am looking for an answer if this can be done or not.
Thanks,
Upvotes: 1
Views: 949
Reputation: 10224
Yes, this is possible, as long as the user clicks on the notification. This could be done either with local notifications, or push notifications.
When an application is launched in response to a notification, the AppDelegate
method application:didFinishLaunchingWithOptions:
will have an option indicating the notification that precipitated the launch.
It cannot, to my knowledge, be achieved without user interaction.
Upvotes: 3