The notification does not appear on one of the iOS devices

I am having a notification issue. A notification has not been displayed on the device since the last 12 hours. He worked before. Sending to other devices is working fine. I checked the notification center and more. Notification is enabled for the application.

After http://developer.apple.com/library/ios/#technotes/tn2265/_index.html I turned on the inclusion of status messages on iOS.

On the console, the device prints some information, for example:

<Error>: kDataAttachStatusNotification sent, wasAttached: 1 isAttached: 1 

What does it mean? Does it receive a notification from the server and cannot show and receive for any reason?

Edit: After syncing logs with itunes. Logs say something like:

 2013-08-01 10:51:06 +0530 apsd[76]: _getClientIdentity: already had identity: <SecIdentityRef: (some value here)> wasUp NO isUp NO linkQualityBelowAndWOWAvail: YES wantsInterfaceAssertion YES avoidWWANOnCall NO 2013-08-01 10:51:06 +0530 apsd[76]: _getClientIdentity: already had identity: <SecIdentityRef: (some value here)> 2013-08-01 10:51:06 +0530 apsd[76]: peer(68) received XPC_ERROR_CONNECTION_INVALID 
+6
source share
1 answer

Did you request permission from the user for notifications?

Try adding the following code to your AppDelegate application: didFinishLaunchingWithOptions: ::

Swift:

  if (UIApplication.instancesRespondToSelector(Selector("registerUserNotificationSettings:"))) { application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: .Alert, categories: nil)) } 

Objective-C:

 if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert categories:nil]]; } 
0
source

Source: https://habr.com/ru/post/950731/


All Articles