使用未解析的标识符 'FIRInstanceIDAPNSTokenTypeSandbox'
Use of unresolved identifier 'FIRInstanceIDAPNSTokenTypeSandbox'
我正在尝试将我的应用程序从 google 云消息传递 (GCM) 迁移到 Firebase 云消息传递 (FCM)。文档说我们需要把这个函数
func application(application: UIApplication,didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type:FIRInstanceIDAPNSTokenTypeSandbox)
}
但是我在 FIRInstanceIDAPNSTokenTypeSandbox
上得到了未解析的标识符,即使我已经导入了 Firebase
、FirebaseInstanceID
、FirebaseMessaging
。你知道为什么吗?
我感谢你们提供的任何线索。谢谢!
对于Swift,你必须使用
FIRInstanceIDAPNSTokenType.Sandbox 而不是 FIRInstanceIDAPNSTokenTypeSandbox。
对我有用。
我正在尝试将我的应用程序从 google 云消息传递 (GCM) 迁移到 Firebase 云消息传递 (FCM)。文档说我们需要把这个函数
func application(application: UIApplication,didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
FIRInstanceID.instanceID().setAPNSToken(deviceToken, type:FIRInstanceIDAPNSTokenTypeSandbox)
}
但是我在 FIRInstanceIDAPNSTokenTypeSandbox
上得到了未解析的标识符,即使我已经导入了 Firebase
、FirebaseInstanceID
、FirebaseMessaging
。你知道为什么吗?
我感谢你们提供的任何线索。谢谢!
对于Swift,你必须使用 FIRInstanceIDAPNSTokenType.Sandbox 而不是 FIRInstanceIDAPNSTokenTypeSandbox。
对我有用。