由于我切换到使用PushKit
应用程序框架,因此收到推送时没有应用程序徽章更改。
我使用的对 APNS 实施的更改PushKit
:
在服务器端,我用 VOIP 推送证书替换了 APNS 证书。
在客户端,我替换了:
registerForRemoteNotifications
和PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()]; pushRegistry.delegate = (AppDelegate*)[[UIApplication sharedApplication] delegate]; pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];`
didRegisterForRemoteNotificationsWithDeviceToken
并didFailToRegisterForRemoteNotificationsWithError
与didUpdatePushCredentials
didReceiveRemoteNotification
并didReceiveRemoteNotification FetchComplitionHandler
与didReceiveIncomingPushWithPayload
结果,didReceiveIncomingPushWithPayload
被调用,我在有效负载字典中看到有效的徽章编号,但不幸的是,应用程序徽章没有改变。