ios - Why didReceiveRemoteNotification:fetchCompletionHandler is called but usual didReceiveRemoteNotification isn't? -
remote with are: content = 1 flag and
body
, badge
and normal push notifications with other accessories
I have two representatives determine methods didReceiveRemoteNotification: fetchCompletionHandler
and always didReceiveRemoteNotification
How to fix it?
Why do not I get two representative methods for the background and are pushed as usual?
iOS 7 only says the new one, how I handled it in my application:
- (void) application: (UIApplication *) application didReceiveRemoteNotification: (NSDictionary *) userInfo {// close [application on self-application: application Tharemoremoteshn notification: User Info fetch Kanplepshnhandlr: Nile]; } - (void) application: (UIApplication *) application didReceiveRemoteNotification: (NSDictionary *) userInfo fetchCompletionHandler: (void (^) (UIBackgroundFetchResult)) check completionHandler {// Make sure that the background ([UIApplication sharedApplication] .applicationState == UIApplicationStateInactive } {// user opened push notifications} other {// user has not opened it; this was a silent update}}
Comments
Post a Comment