찾다

 >  Q&A  >  본문

objective-c - 推送一条信息,收到多条重复推送(5条)

  1. 描述你的问题
    我在云端推送一条消息,有两台设备,iOS9.2和iOS7.3,9.2收到5条重复数据,7.3正常收到一条数据,这让我非常困惑,有大神能指点下吗。

  2. 贴上相关代码
    注册推送代码如下:

—— (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// 注册推送
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert categories:nil];
    [application registerUserNotificationSettings:settings];
    [application registerForRemoteNotifications];
}  else {
    UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
    [application registerForRemoteNotificationTypes:myTypes];
}
}
阿神阿神2758일 전491

모든 응답(1)나는 대답할 것이다

  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:21:05

    실패했는지 확인하려면 돌아가세요. 단, 클라이언트에서는 병합 알림 ID를 확인해야 합니다

    회신하다
    0
  • 취소회신하다