我已按照 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
}
}
最佳答案
关于ios - Firebase 不断给出错误“找不到国家/地区代码文件”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52636029/