Apple PushKit didUpdatePushCredentials is never called on iOS 9+

泪湿孤枕 提交于 2019-12-05 00:28:37

Enabling the "Push notification" flag from Project->Capabilities solved my issue. It's strange because it was working without it earlier. This reply maybe late but hopefully this helps someone. I had a hard time figuring this out.

If you're running a newer xcode (I'm on xcode 9) then VOIP is not in the Background section on the Capabilities tab. This will prevent didUpdatePushCredentials from being called!

The trick is you have to go in your plist, and in Required Background Modes you need to add App provides Voice over IP services.

So I had this problem as well, and spent two days pulling my hair out. I did all of these:

  • clean project turn on / off background modes
  • turn on / off push notifications
  • restart x-code
  • restart computer
  • removed app from device
  • cleaned /Library/Developer/DerivedData
  • then i'd revoke all certificates, removed all provisioning profiles. Removed them even from my keychain. Created everything again and installed it again in keychain and xcode.

All of this did not help.

Then, for some reason i thought, what if i just turn my phone, which i was testing with, off and on again.

and then it worked...

For me It was the issue of Certificates. The development certificate was used by my app, did not configured push in that certificates. Hope this may help anybody..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!