Push notifications are not working in updated version from ios7 to ios8.1 -


I updated my device from ios7 to ios8.1. Push notifications are not working in the updated version. I did this procedure for push notifications which are done in ios7. The code has also been updated

  #ifdef __IPHONE_8_0 // True, this point is UIUserNotificationSettings * settings = [UIUserNotificationSettings SettingsForTypes: (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories: zero]; [[UIApplication shared application] Register User Notification Settings: Settings]; # Register to receive information / registration UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound; [[UIApplication shared applicant] registerfororemote notification type: Maites]; # Code  

I did not receive the notification using the above code. Please help me for push notifications in ios8.1.

Thanks inadvance

  - (zero) application: div> 

itemprop = "text">

(UIApplication *) Application HandleActionWind Identifier: (NSString *) identifier

For more information, see.

Here is the full example of an app representative:

  - (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary *) launchOptions {if ([Applications Answers To Treseller: @Selector (Register User Notification Settings) {NSLog (@ "Request Permission for Push Notification .."); // iOS 8 UI User Notification Settings * Settings = [UI User Notification Settings SettingsType: UI User Notification Type Alert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories: zero]; [UIApplication.sharedApplication Register User Notification Settings: Settings]; } Else {NSLog (@ "Registering Device for Push Notification ..."); // iOS 7 and earlier [UIApplication.sharedApplication registerForRemoteNotificationTypes: UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound]; } Yes return; } - (blank) Application: (UIApplication *) Application: Controller User Information Settings: (UIUserNotificationSettings *) Settings {NSLog (@ "Device Registration for Push Notification ..."); // iOS 8 [Application RegisterForMotor Notification]; } - (void) application: (UIApplication *) application didRegisterForRemoteNotificationsWithDeviceToken: (NSData *) Token {NSLog (@ ":% @, device token registration is successful, the bundle identifier% @", [NSBundle.mainBundle bundleIdentifier], token); } - (Zero) Application: (UIApplication *) was appliedFileToAgasterForMotNotificationExploretion: (NSERR * *) Error {NSLog (@ "Failed to register:% @", error); } - (void) application: (UIApplication *) application handleActionWithIdentifier: (NSString *) identifier forRemoteNotification: (NSDictionary *) notification CompletionHandler: (void (^) ()) completionHandler {NSLog ( "@ receive push notifications:% @, identifier :% @ ", Notification, identifier); // iOS 8 full handler (); } - (Zero) Application: (UIApplication *) application didReceiveRemoteNotification: (NSDictionary *) Information {NSLog (@ "Push Notification:% @", Notification Received); // iOS 7 and earlier}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -