iOS上的Firebase SMS验证-“令牌不匹配" [英] Firebase SMS Verification on iOS - 'Token Mismatch'

查看:128
本文介绍了iOS上的Firebase SMS验证-“令牌不匹配"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试与一些外部用户一起对我的应用进行Beta测试时,他们中的任何一个都无法使用电话号码短信验证功能正确进入该应用.当直接从Xcode构建时,开发人员都可以使用该应用程序,但是通过链接安装的任何人都不能使用它.

When attempting to beta test my application with some external users, none of them could properly enter the app using the phone number sms verification. The developers could all use the application when built directly from Xcode, but anyone who installed via a link could not use it.

每个尝试登录/注册的用户都会得到错误提示Token Mismatch-没有其他信息.

Each user attempting to sign in / sign up would get an error readout of Token Mismatch - with no other info.

我有一个有效的生产APNS证书,为什么它不起作用?

I have a valid production APNS certificate, why is this not working??

推荐答案

我为解决该问题而采取的步骤:

  1. 确保我同时拥有有效的developmentproduction APNS 证书已上传到Firebase仪表板的项目"下 设置">云消息传递"
  1. Ensure I had both a valid development and production APNS certificate uploaded to the Firebase Dashboard, under 'Project Settings' > 'Cloud Messaging'

  1. 在Xcode中的<my app> .entitlements文件中,确保 APS 环境值设置为开发"或生产", 取决于您的测试情况.
  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. 最后(这是我所缺少的),检查一下您的 AppDelegate.swift以及方法的内部 didRegisterForRemoteNotificationsWithDeviceToken,更改值 从.sandbox.prod,从 .unknown 捆绑包根据您的配置文件确定要使用的令牌类型.
  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.

这篇关于iOS上的Firebase SMS验证-“令牌不匹配"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆