Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nepoty

macrumors newbie
Original poster
Jul 14, 2015
0
0
We use remote push notification with content available key set to 1 which , from
apple documentation, it has to wake up the app, but it doesn't work properly, sometimes
the app doesn't wake up.
We use this mechanism to send device location to our server.
Why remote push notification doesn't wake up my app all the time ?
 
We use remote push notification with content available key set to 1 which , from
apple documentation, it has to wake up the app, but it doesn't work properly, sometimes
the app doesn't wake up.
We use this mechanism to send device location to our server.
Why remote push notification doesn't wake up my app all the time ?

Have you actually hooked up
Code:
- (void)application:(UIApplication *)applicationdidReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResultresult))handler {
NSLog(@"awaken in background");
}

You should receive the nslog in your debugger if your app is in the background

Sorry you mentioned 'sometimes' this is because pushnotifications are not guarenteed to be delivered, also this background mode is guarenteed to work at least once in 24 hours.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.