0

There are some devices that are not currently being developed and notified by push notifications, notification centers.

The following are the conditions tested, but it is helpful if you can tell me the possible causes.

Even if you can not conclude, it is fine as a possible cause as a possibility.

Mechanism of notification

① User sets time

② Notify the silent push

③ Access the server from the application side to obtain update information

④ Push notification, update information displayed to notification center

About notification

At the time of application start (foreground)

Iphone 6 ◯

Iphone 6 - 2 ◯

Iphone 6-3 ◯

Iphone 6s ◯

Iphone 7 ×

Iphone 7 ×

Application end (background)

Iphone 6 ◯

Iphone 6 - 2 x

Iphone 6-3 ×

Iphone 6s ◯

Iphone 7 ×

Iphone 7 ×

Iphone sleep (background)

Iphone 6 ◯

Iphone 6 - 2 x

Iphone 6-3 ×

Iphone 6s ◯

Iphone 7 ×

Iphone 7 ×

◯ is receivable × can not be received

version

Iphone 6 10.3.1

Iphone 6 - 2 10.3.1

Iphone 6-3 10.2.1

Iphone 6s 10.3.1

Iphone 7 10.3.1

Iphone 7 10.3.1

Other conditions

All notification settings are on

Install from testflight

Install on a total of 6 units

Three iPhone 6

Results are the same for 4G line and wifi environment

joyjoy
  • 1
  • Can you explain your notation for the testing results. Also: do you have logs in place of the AppDelegate, whether the devices were able to register for notifications, thus received a token and whether you could communicate with the server taking care of the push triggering? – Lepidopteron May 09 '17 at 07:48

1 Answers1

0

thank you for your comment. I will examine the logs as you have pointed out. And I made such a code for this problem. What do you think?

if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) { UIUserNotificationType allNotificationTypes = (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge); UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; } else { // iOS 10 or later

    UNAuthorizationOptions authOptions =
    UNAuthorizationOptionAlert
    | UNAuthorizationOptionSound
    | UNAuthorizationOptionBadge;
    [[UNUserNotificationCenter currentNotificationCenter]
     requestAuthorizationWithOptions:authOptions
     completionHandler:^(BOOL granted, NSError * _Nullable error) {
     }
     ];

    // For iOS 10 display notification (sent via APNS)
    [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
    // For iOS 10 data message (sent via FCM)

}

[[UIApplication sharedApplication] registerForRemoteNotifications];
joyjoy
  • 1