Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of unresolved identifier 'FIRInstanceIDAPNSTokenTypeSandbox'

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!

like image 957
Turner Avatar asked Aug 08 '16 09:08

Turner


1 Answers

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

It works for me.

like image 195
Usman Nisar Avatar answered Nov 15 '22 02:11

Usman Nisar