Firebase(电话身份验证)获取 iOS 错误:注册自定义 URL 方案 [英] Firebase (Phone Auth) Getting iOS error: register custom URL scheme
问题描述
我的 Flutter 应用使用 Firebase 身份验证(电话).我一直看到错误:'Please register custom URL scheme 'com.googleusercontent.apps.602546125958-5lk04ghhdfj5xxxxxxxx'
.
My flutter app uses Firebase Auth (Phone). I keep seeing the error: 'Please register custom URL scheme 'com.googleusercontent.apps.602546125958-5lk04ghhdfj5xxxxxxxx'
.
我已将 URL 架构添加到 info.plist 中,如下所示,但我遇到了同样的错误.
I have added the URL schema to the info.plist as follows, but I'm getting the same error.
2020-04-29 20:40:05.173962-0400 Runner[395:20944] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Please register custom URL scheme 'com.googleusercontent.apps.602546125958-5lk04ghhdfj5xxxxxxxx' in the app's Info.plist file.'
*** First throw call stack:
(0x1889035f0 0x188625bcc 0x1887f9b28 0x10086cfa8 0x100f056a0 0x102efb3b0 0x102e921bc 0x102eeb9cc 0x102ea2a68 0x102ea4dcc 0x1888821c0 0x188881edc 0x1888815b8 0x18887c5c8 0x18887bc34 0x1929c538c 0x18c9ae22c 0x10082addc 0x188703800)
libc++abi.dylib: terminating with uncaught exception of type NSException
推荐答案
从 .plist 文件中删除您的 URL Type 条目并按照步骤操作,.plist 条目将自动生成.
这也适用于 Flutter
This works for Flutter as well
步骤:
如果要添加 1 个以上的 URL Schemes,可以在 URL Types 中单击 +.
You can click on + in URL Types if you want to add more than 1 URL Schemes.
如果您有任何问题,请发表评论.
Please comment if you have any questions.
乐于助人!
这篇关于Firebase(电话身份验证)获取 iOS 错误:注册自定义 URL 方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!