When I launch my app on iOS 10, I get the request notification permission twice. The first one briefly appears and disappears immediately without allowing me to do any actions, then I got the second popup with a normal behaviour waiting for "allow" or "deny" from the user.
Here is my code that worked well before iOS 10.
In the method didFinishLaunchingWithOptions from the AppDelegate :
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
#ifdef __IPHONE_8_0
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge
|UIRemoteNotificationTypeSound
|UIRemoteNotificationTypeAlert) categories:nil];
[application registerUserNotificationSettings:settings];
#endif
} else {
UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
[application registerForRemoteNotificationTypes:myTypes];
}
Should I implement something for iOS 10 in order to fix this double request permission ?