简体   繁体   中英

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.

I actually DID both register ok and received notification earlier, but I must have managed to screw something up or gotten blacklisted by 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.

Any ideas on what's going on here ? Please ask for more info if I missed something.

gist with AppDelegate/settings/console output

I had the same issue. As @sugarngp mentioned in his comment above, my issue is that my PKPushRegistry object was getting deallocated. Once I made it an instance variable of my AppDelegate it fixed the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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