简体   繁体   English

为什么从未调用过UpdatePushCredentials

[英]Why is didUpdatePushCredentials never called

I'm trying to get push notifications to my iOS app using PushKit, but I never get a callback when registering for the notifications. 我正在尝试使用PushKit将推送通知发送到我的iOS应用程序,但是在注册通知时从未收到回调。

I actually DID both register ok and received notification earlier, but I must have managed to screw something up or gotten blacklisted by Apple. 我实际上DID都注册正确,并且较早收到通知,但是我一定设法弄砸了东西,或者被Apple列入了黑名单。

I can still send the notifications fine (to sandbox apps), but I never get the notifications and I assume this has to do with the missing callback when registering in the app. 我仍然可以将通知发送给沙箱应用程序,但仍然无法收到通知,我认为这与在应用程序中注册时丢失的回调有关。 Sending to production renders an "INVALID TOKEN" error which I assume is fine as the app isn't in the app store. 发送到生产中会呈现“ INVALID TOKEN”错误,我认为这是很好的,因为该应用程序不在应用程序商店中。

Any ideas on what's going on here ? 关于这里发生的事情有什么想法吗? Please ask for more info if I missed something. 如果我错过了一些东西,请询问更多信息。

gist with AppDelegate/settings/console output 具有AppDelegate /设置/控制台输出的要点

I had the same issue. 我遇到过同样的问题。 As @sugarngp mentioned in his comment above, my issue is that my PKPushRegistry object was getting deallocated. 正如@sugarngp在上面的评论中提到的那样,我的问题是我的PKPushRegistry对象被释放了。 Once I made it an instance variable of my AppDelegate it fixed the issue. 一旦将其设为AppDelegate的实例变量,它便解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM