2

私は、プッシュ通知にFirebaseを使用しています。 didRegisterForRemoteNotificationsWithDeviceTokenFirebaseプッシュ通知 - XCode 8.0/Swift 3.0/ios 10.0

、私はラインを次のようしている。

FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.prod) 

私は、次のエラーメッセージが出ます:

が期待される引数の型「データ」へのタイプ「データ」の値を変換できません。

答えて

0

4.0.0にごFirebase SDKを更新し、次のコードを追加します。

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { 

     Messaging.messaging().apnsToken = deviceToken 

     let firebaseAuth = Auth.auth() 
     // .sandbox is used during development, later on it can be changed to .prod 

     firebaseAuth.setAPNSToken(deviceToken, type: AuthAPNSTokenType.sandbox) 
} 
関連する問題