ich mit ios ein iphone bin mit 9,3IOS 9 Push-Benachrichtigung - didRegisterForRemoteNotificationsWithDeviceToken nicht Anruf sind
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
UIUserNotificationType types = (UIUserNotificationType) (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
return YES;
}
Nach der Anmeldung Registrierung ist diese Methode Aufruf:
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
//register to receive notifications
[application registerForRemoteNotifications];
}
Nach der [Anwendung registerForRemoteNotifications] erscheint das System-Popup, ich akzeptiere die Meldung, aber die Methode:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *) deviceToken
Ist nie anrufen, was fehlt mir?
Dies funktioniert gut auf ios 8
Haben fügen Sie die richtigen Berechtigungen? – EmilioPelaez
hast du didFailToRegisterForRemoteNotifications implementiert und gesehen, ob es aufgerufen wird? – Gruntcakes
Die didFailToRegisterForRemoteNitifications ist kein Aufruf ... Aber die didRegisterUserNotificationSettings ist Anruf – Jordan