Using the unresolved identifier 'FIRInstanceIDAPNSTokenTypeSandbox'

I am trying to migrate my applications from cloud messaging service (GCM) to firebase cloud messaging (FCM). The document says that we need to put this function

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

But I get an unresolved identifier on FIRInstanceIDAPNSTokenTypeSandbox , even I already import Firebase , FirebaseInstanceID , FirebaseMessaging . You know why? I appreciate any help from the guys. Thanks!

+5
source share
1 answer

For Swift, you need to use FIRInstanceIDAPNSTokenType.Sandbox instead of FIRInstanceIDAPNSTokenTypeSandbox.

This works for me.

+9
source

All Articles