Firebase Cloud Messaging development and release profile

后端 未结 4 1016
误落风尘
误落风尘 2020-12-29 11:29

I recendly swtiched over from Google Cloud Messaging to Firebase Cloud Messaging.

With GCM I had to choose the sandbox option. As described here : https://developers

4条回答
  •  天命终不由人
    2020-12-29 12:18

    It is about the setAPNSToken() function. You need to set the FIRInstanceIDAPNSTokenType to Prod while adding the device token. I use swift for that, the code I used is this:

    func application(application: UIApplication,
                     didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData)
    {
        FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.Prod)
    }
    

    also if you just want to remove the warning, you may use a production provisioning profile.

提交回复
热议问题