views:

56

answers:

2

Hi All,

I have integrated push notifications in my app. They seem to work fine when the app is not running, but when I open the app they are not received (although they are received when I run a different app).

My app highly depends on a good network connection, so there is no reason that notifications are not received due to bad network connection as all other things seems to work fine.

Are they affected by the network communication of the app, as most of the times my app is involved in network calls and receiving data.

If the problem is not clear feel free to comment.

Thanks,

Madhup

+1  A: 

Are you implementing this delegate method in your App Delegate:

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

Try breakpointing there and see if it gets called.

See the API docs for the UIApplicationDelegate for more details.

phooze
A: 

My guess is that you implement application:didFinishLaunchingWithOptions: To get the push during launch while your app is closed. To receive them while you are running, you need to implement application:didReceiveRemoteNotification.

Elfred