didRegisterForRemoteNotificationsWithDeviceToken未使用Apigee SDK调用

时间:2015-08-25 19:09:24

标签: ios iphone push-notification apigee apigee-baas

我一直在尝试使用Apigee SDK注册推送通知,但在某些设备上,iPhone 5和6不会收到推送通知。更具体地说,既不是UIApplication委托方法

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error

未被调用。

尝试发送推送通知时出现此错误

发送所有通知时出现问题。请参阅属性"中的deliveryErrors,      "州":"失败",      " deliveryErrors":[        "没有通知设备e438f4ca-4b46-11e5-8eb8 -..."      ],

我注册:

if ([self respondsToSelector:@selector(registerUserNotificationSettings:)]) {
            // iOS 8 and higher
            [self registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
            [self registerForRemoteNotifications];
        } else {
            // iOS 7 and lower
            [self registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
        }

在某些设备上,注册成功,但在其他设备上没有。

0 个答案:

没有答案