Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ios每次通过firestore验证时都需要reCAPCHA(颤振)_Ios_Xcode_Flutter_Firebase Authentication_Recaptcha - Fatal编程技术网

ios每次通过firestore验证时都需要reCAPCHA(颤振)

ios每次通过firestore验证时都需要reCAPCHA(颤振),ios,xcode,flutter,firebase-authentication,recaptcha,Ios,Xcode,Flutter,Firebase Authentication,Recaptcha,我正在我的颤振应用程序中使用手机验证。我的目标是拥有以下流程:1。用户输入电话号码2。向用户发送验证代码3。用户输入代码并登录。在android上,这就是我得到的流量。然而,在ios上,它是1。用户输入电话号码2。reCAPCHA页面打开以确保我不是机器人3。向用户发送验证代码4。用户输入代码并登录(这在ios emulator上发生)。我想把reCAPCHA页面去掉。有些人建议我打开“远程通知”,所以我尝试在Xcode中这样做,将其作为“功能”添加到我的runner中,现在我的Info.pli

我正在我的颤振应用程序中使用手机验证。我的目标是拥有以下流程:1。用户输入电话号码2。向用户发送验证代码3。用户输入代码并登录。在android上,这就是我得到的流量。然而,在ios上,它是1。用户输入电话号码2。reCAPCHA页面打开以确保我不是机器人3。向用户发送验证代码4。用户输入代码并登录(这在ios emulator上发生)。我想把reCAPCHA页面去掉。有些人建议我打开“远程通知”,所以我尝试在Xcode中这样做,将其作为“功能”添加到我的runner中,现在我的Info.plist包括

<key>UIBackgroundModes</key>
    <array>
        <string>remote-notification</string>
    </array>
颤振医生输出

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-US)
    • Flutter version 1.12.13+hotfix.5 at /Users/gollyzoom/development/flutter
    • Framework revision 27321ebbad (3 months ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/gollyzoom/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3, Build version 11C29
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 38.1.3
    • Dart plugin version 191.8593

[✓] Connected device (2 available)
    • Android SDK built for x86 • emulator-5554                        • android-x86 • Android 9 (API 28) (emulator)
    • iPhone 11 Pro Max         • B3536B50-C435-4442-9CF4-69D470B979CA • ios         •
      com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

• No issues found!

如果有人能给我一些建议,我将不胜感激

您需要为iOS设置静默推送通知

参考本文件:

您将看到在授权电话号码时有两种策略:reCaptcha(验证您不是机器人)和静默推送通知

还有其他配置,但概括起来:

  • 在Xcode中,为项目启用推送通知
  • 将您的APNs身份验证密钥上载到Firebase

  • 这恰好也出现在Android中。在输入验证码之前,我打开了reCaptcha。

    以下是我在Android中遇到的问题的解决方案

    @Omrankabalan采取的步骤

    如果你有一个Firebase项目,你可以从这里打开

    然后选择“全部”选项卡并选择现有项目

    然后转到API&Services=>Library 搜索“Android设备验证”

    启用它

    在Firebase中,确保在项目设置中添加SHA-256


    在真正的设备上测试它

    这里也一样,我知道为什么会这样。这是因为添加了应用程序级构建渐变依赖项中的
    实现“androidx.browser:browser:1.2.0”。但对我来说,删除它会导致应用程序崩溃。我不知道为什么?这看起来像是他们在上一个版本中实现的东西。我不知道是否有人可以恢复到旧版本,如果这将工作。谢谢你的回复。我创建了一个支持颤振的票证。嘿,你能告诉我发生了什么,他们说了什么吗?是否有办法绕过此问题?我仍在与颤振支持人员交谈,并为他们创建了一个MCVE,并将保持该票证的更新。@FaizanKamal我在删除=>实现“androidx.browser:browser:1.2.0”时出错。我已经添加了SHA-1和SHA-256。它仍然在浏览器中打开recaptcha视图。你找到解决办法了吗?谢谢,但我们更关心的是Android而不是IOS。我看过关于IOS的,但安卓的这种行为太令人讨厌了。
    
    [✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-US)
        • Flutter version 1.12.13+hotfix.5 at /Users/gollyzoom/development/flutter
        • Framework revision 27321ebbad (3 months ago), 2019-12-10 18:15:01 -0800
        • Engine revision 2994f7e1e6
        • Dart version 2.7.0
    
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        • Android SDK at /Users/gollyzoom/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-29, build-tools 28.0.3
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.3, Build version 11C29
        • CocoaPods version 1.8.4
    
    [✓] Android Studio (version 3.5)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 39.0.3
        • Dart plugin version 191.8423
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2019.1.4)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        • Flutter plugin version 38.1.3
        • Dart plugin version 191.8593
    
    [✓] Connected device (2 available)
        • Android SDK built for x86 • emulator-5554                        • android-x86 • Android 9 (API 28) (emulator)
        • iPhone 11 Pro Max         • B3536B50-C435-4442-9CF4-69D470B979CA • ios         •
          com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
    
    • No issues found!