Firebase SMS Verification on iOS - 'Token Mismatch'

亡梦爱人 提交于 2019-12-05 17:22:15

Steps I took to solve the problem:

  1. Ensure I had both a valid development and production APNS certificate uploaded to the Firebase Dashboard, under 'Project Settings' > 'Cloud Messaging'

  1. In Xcode, in the <my app>.entitlements file, make sure the APS Environment value is set to either 'development' or 'production', depending on your testing situation.

  1. Finally (this is what I was missing), check inside your AppDelegate.swift and inside the method for didRegisterForRemoteNotificationsWithDeviceToken, change the value from .sandbox to .prod, or to .unknown to let the app bundle determine which token type to use, based on your provisioning profile.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!