Victor Ronin
Victor Ronin

Reputation: 23268

What delegate is called for a push notification if an application is in background mode

I read through almost a dozen questions on SO and Apple documentation, but still unclear on one case (mainly, because everybody use a little different terminology).

The case which I am interested in is:

a) An application is running in background state (as example VOIP). I refer to background state as defined here

b) The application is registered for remote notifications.

c) Provider sends a push notification. iOS devices receives this notification.

What will happen next?

1) iOS will display according UI (alert, badge) and no delegate will be called until user clicks VIEW button on an alert or will tap application icon on Springboard.

My understanding this is what suppose to happen.

or

2) didReceiveRemoteNotification delegate will be called immediately

I would appreciate, if you can clear this out for me.

Upvotes: 1

Views: 1149

Answers (2)

Teja Kumar B
Teja Kumar B

Reputation: 9

-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;

will be called.

Upvotes: 0

aleks
aleks

Reputation: 46

No delegate will be called until you eneter application by tapping on the notification. Then this is the order of callbacks:

1) applicationWillEnterForeground
2) didReceiveRemoteNotification
2) applicationDidBecomeActive 

Upvotes: 1

Related Questions