公式の記事を参考に,FIrebaseUIを用いてappleでのログイン認証をしたいのですが,以下のような画面のままローディング中になってすすみません.
以下はコードになります.
Swift
1import UIKit 2import Firebase 3import FirebaseAuth 4import FirebaseUI 5 6class ViewController: UIViewController, FUIAuthDelegate { 7 8 9 var provider:OAuthProvider? 10 let authUI = FUIAuth.defaultAuthUI() 11 let providers: [FUIAuthProvider] = [ 12 FUIEmailAuth(), 13 FUIGoogleAuth(), 14 FUIFacebookAuth(), 15 FUIPhoneAuth(authUI: FUIAuth.defaultAuthUI()!), 16 FUIOAuth.appleAuthProvider(), 17 FUIOAuth.twitterAuthProvider(), 18 FUIOAuth.githubAuthProvider(), 19 /*FUIOAuth.microsoftAuthProvider(), 20 FUIOAuth.yahooAuthProvider(),*/ 21 ] 22 23 override func viewDidLoad() { 24 super.viewDidLoad() 25 26 authUI?.delegate = self 27 self.authUI?.providers = providers 28 FUIAuth.defaultAuthUI()?.shouldHideCancelButton = true 29 // Present the auth view controller and then implement the sign in callback. 30 let authViewController = authUI!.authViewController() 31 authViewController.modalPresentationStyle = .fullScreen 32 self.present(authViewController, animated: true, completion: nil) 33 } 34 35 func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?) { 36 // handle user (`authDataResult.user`) and error as necessary 37 print(Auth.auth().currentUser!.uid) 38 let regVC = self.storyboard?.instantiateViewController(withIdentifier: "register") as! RegisterViewController 39 self.navigationController?.pushViewController(regVC, animated: true) 40 } 41}
以下はエラーのログになります.
2020-12-29 13:15:33.316898+0900 LoveJudgement[5140:8260676] <Warning>: Please set a value for FacebookAutoLogAppEventsEnabled. Set the flag to TRUE if you want to collect app install, app launch and in-app purchase events automatically. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events. 2020-12-29 13:15:33.317574+0900 LoveJudgement[5140:8260676] <Warning>: You haven't set a value for FacebookAdvertiserIDCollectionEnabled. Set the flag to TRUE if you want to collect Advertiser ID for better advertising and analytics results. 2020-12-29 13:15:33.645001+0900 LoveJudgement[5140:8261095] [connection] nw_proxy_resolver_create_parsed_array [C1 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:33.717031+0900 LoveJudgement[5140:8261095] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed 2020-12-29 13:15:33.795566+0900 LoveJudgement[5140:8261095] 7.3.0 - [Firebase/Core][I-COR000008] The project's Bundle ID is inconsistent with either the Bundle ID in 'GoogleService-Info.plist', or the Bundle ID in the options if you are using a customized options. To ensure that everything can be configured correctly, you may need to make the Bundle IDs consistent. To continue with this plist file, you may change your app's bundle identifier to 'gakeppuchi.net.LoveJudgement'. Or you can download a new configuration file that matches your bundle identifier from https://console.firebase.google.com/ and replace the current one. 2020-12-29 13:15:33.855021+0900 LoveJudgement[5140:8261107] 7.3.0 - [Firebase/Analytics][I-ACS023007] Analytics v.7.3.0 started 2020-12-29 13:15:33.894265+0900 LoveJudgement[5140:8261105] 7.3.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r) 2020-12-29 13:15:33.999183+0900 LoveJudgement[5140:8261121] [connection] nw_proxy_resolver_create_parsed_array [C2 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:34.145836+0900 LoveJudgement[5140:8261103] [connection] nw_proxy_resolver_create_parsed_array [C3 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:34.152943+0900 LoveJudgement[5140:8261103] [connection] nw_proxy_resolver_create_parsed_array [C4 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:34.202416+0900 LoveJudgement[5140:8261103] 7.3.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement 2020-12-29 13:15:34.561693+0900 LoveJudgement[5140:8260676] [Presentation] Presenting view controller <UINavigationController: 0x7fcb438b9a00> from detached view controller <LoveJudgement.ViewController: 0x7fcb4301a620> is discouraged. 2020-12-29 13:15:34.727247+0900 LoveJudgement[5140:8260676] FBSDKLog: starting with Graph API v2.4, GET requests for /474329213548234/model_asset should contain an explicit "fields" parameter 2020-12-29 13:15:35.100235+0900 LoveJudgement[5140:8261104] [connection] nw_proxy_resolver_create_parsed_array [C5 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:35.244217+0900 LoveJudgement[5140:8261122] [connection] nw_proxy_resolver_create_parsed_array [C6 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:35.379076+0900 LoveJudgement[5140:8260676] Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0x7fcb41830c00>. 2020-12-29 13:15:35.543569+0900 LoveJudgement[5140:8261104] [connection] nw_proxy_resolver_create_parsed_array [C7 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:35.608321+0900 LoveJudgement[5140:8261103] 7.3.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled 2020-12-29 13:15:35.609660+0900 LoveJudgement[5140:8261103] 7.3.0 - [Firebase/Analytics][I-ACS023220] Analytics screen reporting is enabled. Call +[FIRAnalytics logEventWithName:FIREventScreenView parameters:] to log a screen view event. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO (boolean) in the Info.plist 2020-12-29 13:15:36.607404+0900 LoveJudgement[5140:8261104] [connection] nw_proxy_resolver_create_parsed_array [C8 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:15:37.047818+0900 LoveJudgement[5140:8261103] 7.3.0 - [Firebase/Analytics][I-ACS023130] Configuration not found. Using default configuration 2020-12-29 13:15:37.303630+0900 LoveJudgement[5140:8261107] [connection] nw_proxy_resolver_create_parsed_array [C9 proxy pac] Evaluation error: NSURLErrorDomain: -1003 2020-12-29 13:17:48.504303+0900 LoveJudgement[5140:8262819] Received XPC error Connection interrupted for message type 3 kCFNetworkAgentXPCMessageTypePACQuery 2020-12-29 13:17:48.505629+0900 LoveJudgement[5140:8262819] Received XPC error Connection invalid for message type 3 kCFNetworkAgentXPCMessageTypePACQuery
ご教示願います.
---追記---
おそらく以下のエラーが原因かと思われます.
また,stack overflowにも同じ質問がされていました.
Received XPC error Connection interrupted for message type 3 kCFNetworkAgentXPCMessageTypePACQuery
---追記2---
Apple developerで同様の質問がされており,解決されていない問題のようです.
私は14.3のエミュレータで問題が生じており,実機の14.1では正常です.
あなたの回答
tips
プレビュー