Getting an error from push notification

前端 未结 15 2103
失恋的感觉
失恋的感觉 2020-12-01 02:39

In my app, I need push notifications. I am implementing all the instructions from the push notifications docs. But I got an error from Push Notification:

Fai         


        
相关标签:
15条回答
  • 2020-12-01 03:30

    Generate a new provisioning profile, after you enable Push, and it will work!

    0 讨论(0)
  • 2020-12-01 03:30

    That was making me crazy. I cross-checked everything but still was getting the same error. Tried all the other solution given on the web as well. However, this did the trick for me. I create .mobileprovision file before enable APNS. This was the real mistake. Resolution of this problem :

    1. Create App ID
    2. Enable APNS
    3. Then create Provision File

    If you have created provisioning profile earlier and the you have enabled APNS , you should delete provisioning file from everywhere in your system(XCode,keychain,iTuneConnect). And then create provisioning file again.

    0 讨论(0)
  • 2020-12-01 03:33

    ok, a little embarrassing, but sometimes you spend hours on the most idiotic bugs -

    so, I run the application on DEBUG mode instead of AD-HOC.

    to change that, do:

    scheme -> Edit Scheme...

    select Run on the left, and change to Ad-Hoc dist under Build Configuration.

    *of course you need to have the suitable adhoc provisioning profile under build-setting\code signing as well as the suitable APNS certificate attached to it when you create the provisioning profile.

    ** once you run it, it'll crush cause its not on DEBUG mode, but you can still run in from the device.

    enter image description here

    0 讨论(0)
提交回复
热议问题