ios - Firebase 不断给出错误“找不到国家/地区代码文件”

标签 ios swift firebase firebase-realtime-database firebase-authentication

我已按照 google firebase 启动说明设置 Firebase 身份验证,但我仍然收到错误

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not find country code file'

我已经添加了所有 podFiles 我不确定可能缺少哪个文件我该如何解决这个问题。我一直在关注FireBase Tutorial

import UIKit
import Firebase
import FirebaseUI

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate,FUIAuthDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        FirebaseApp.configure()
        let authUI = FUIAuth.defaultAuthUI()
        // You need to adopt a FUIAuthDelegate protocol to receive callback
        authUI!.delegate = self
        let providers: [FUIAuthProvider] = [
            FUIGoogleAuth(),
            FUIPhoneAuth(authUI:FUIAuth.defaultAuthUI()!),
            ]
        authUI!.providers = providers

        return true
    }

    func application(_ app: UIApplication, open url: URL,
                     options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
        let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as! String?
        if FUIAuth.defaultAuthUI()?.handleOpen(url, sourceApplication: sourceApplication) ?? false {
            return true
        }
        // other URL handling goes here.
        return false
    }



}

最佳答案

此帖子将描述您面临的问题:

Link

只需确保您的 FirebaseUI pod 已更新至 4.3.1

关于ios - Firebase 不断给出错误“找不到国家/地区代码文件”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52636029/

相关文章:

android - 适用于 iOS 和 Android 的 FCM 远程通知负载

ios - 通过 Xcode 8 中的按钮移动图像

ios - UISegmentedControl iOS 13 清晰配色

json - Swift 代码出错不知道该写什么来返回?

ios - 是否可以在 iOS UI 测试中模拟两指滑动?

ios - 转换 MGLAnnotationView subview

ios - 如何在 Core Data 中添加和更新多对多关系?

android - 发送消息时谷歌 FCM Invalid_argument

android - Firebase 云消息服务

javascript - 没有子节点之一的 Firebase 数据检索