didUpdatePushCredentials not get called

后端 未结 4 1393
温柔的废话
温柔的废话 2021-01-18 07:28

I want to implement VoIP notifications in my iOS application, But the didUpdatePushCredentials method never got called, I can\'t get the device token.

4条回答
  •  失恋的感觉
    2021-01-18 08:21

    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.

    I can't believe Apple has done this to us. I wasted an 8 hour work day looking for this simple fix.

提交回复
热议问题