I'm trying to migrate my apps from google cloud messaging (GCM) to firebase cloud messaging (FCM). The doc says that we need to put this function
func application(application: UIApplication,didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type:FIRInstanceIDAPNSTokenTypeSandbox)
}
But I get unresolved identifier on FIRInstanceIDAPNSTokenTypeSandbox
even I already import Firebase
, FirebaseInstanceID
, FirebaseMessaging
. Do you know why?
I appreciate any kind of clue from u guys. Thanks!
For Swift, you have to use FIRInstanceIDAPNSTokenType.Sandbox instead of FIRInstanceIDAPNSTokenTypeSandbox.
It works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With