iphone - UINotification ios not received when app is in background -


I am using notification in an app when the app is activated, the notification is received, I process and everything is fine, but I did not get any information when the app is in the background or killed. What is the issue, can anyone help me?

Thank you!

This is what I am doing so far

  - (zero) Application: (UIApplication *) application didRegisterForRemoteNotificationsWithDeviceToken: (NSData *) deviceToken {tokenstring = [[ NSString alloc] initWithFormat: @ "% @", deviceToken]; TokenString = [Token string stringBitremeCountorsConnectSetset: [NSCRCTSat CharactersSatWithSearchersInstring: @ " & gt;"]] ;; Tokenstring = [[NSString alloc] initWithFormat: @ "% @", [tokenstring stringByReplacingOccurrencesOfString: @ "" withString: @ ""]]; NSLog (@ "Tokykin ID: & gt;% @", TokenString); } - (zero) Application: (UIApplication *) application didReceiveRemoteNotification: (NSDictionary *) userInfo {NSLog (@: "didReceiveRemoteNotification% @" userInfo); AudioServicesPlaySystemSound (1002); // some code or logic} - (void) application: (UIApplication *) application didFailToRegisterForRemoteNotificationsWithError: (NSError *) err {NSLog (@: "didFailToRegisterForRemoteNotificationsWithError% @" err.description); }    

You receive remote notifications when - application: didReceiveRemoteNotification: is only called when your app is in the foreground If your app is in the background or eliminated, then the OS may display an alert or playing a sound (based on the APS dictionary notification), but The representative method is not called.

Remote information that is received in the background started with the notification of the action button will only be passed to your application, and then you need to look in the Application Dictionary to launch options Is: DidFinishLaunchingWithOptions: see the content of the notification.

If you are looking at new content fetching / remote notification background support with iOS 7 and see if it helps, because there are very specific situations that work in those functions.



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -