Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个实时应用程序。在实现推送通知程序的苹果商店中。众所周知,我与服务器通信以发送和保存设备令牌。
我的服务器正在为某些设备(请求)正确接收设备令牌,并且还为其他一些设备接收空值。
无论如何,这怎么可能?!
然后您的代码中有错误,设备永远不会生成空令牌,或者您未能实现以下委托:
- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err
如果此委托被调用,那么您可以/应该实现一个重试算法,重试几次以重新注册 APN 令牌。