swift4
xcode9.1
ストーリーボードは正しくコネクトしています。(2重コネクトは無し)
segueの流れはトップ画面→サインアップ画面→ログイン画面で、
サインアップ画面からログイン画面に遷移するためのbuttonをクリックするとクラッシュしThread 1: signal SIGABRTエラーになります。
コンソールには、
libc++abi.dylib: terminating with uncaught exception of type NSExceptionの表示のみです。
(edit scheme上でOS_ACTIVITY_MODE、disable設定をしているから他のエラーは出ないのでしょうか?)
エラーの原因を教えて頂きたいです。
よろしくお願いします。
App
1(App Delegate) 2 3import UIKit 4import Firebase 5import FirebaseAuth 6import GoogleSignIn 7 8@UIApplicationMain 9class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate { 10 11 var window: UIWindow? 12 13 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: 14 [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 15 print("アプリ起動時の処理だよ") 16 FirebaseApp.configure() 17 18 GIDSignIn.sharedInstance().clientID = FirebaseApp.app()?.options.clientID 19 GIDSignIn.sharedInstance().delegate = self 20 return true 21 } 22 func applicationWillResignActive(_ application: UIApplication) { 23 print("アプリを閉じそうな感じだよ") 24 } 25 func applicationDidEnterBackground(_ application: UIApplication) { 26 print("アプリを閉じたよ") 27 } 28 func applicationWillEnterForeground(_ application: UIApplication) { 29 print("アプリを開きそうな感じだよ") 30 } 31 func applicationDidBecomeActive(_ application: UIApplication) { 32 print("アプリを開いたよ") 33 } 34 func applicationWillTerminate(_ application: UIApplication) { 35 print("フリックしてアプリを終了させたよ") 36 } 37 38 func application(_ app: UIApplication, open url: URL, options: 39 [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { 40 41 let handled = GIDSignIn.sharedInstance().handle(url, sourceApplication:options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String!, annotation: options[UIApplicationOpenURLOptionsKey.annotation]) 42 43 return handled 44 } 45 func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) 46 { 47 if let error = error { 48 print(error.localizedDescription) 49 return 50 } 51 print("Googleログインが成功したよ") 52 53 guard let authentication = user.authentication else { return } 54 55 let credential = GoogleAuthProvider.credential(withIDToken: authentication.idToken, 56 accessToken: authentication.accessToken) 57 58 Auth.auth().signIn(with: credential, completion: { (user, error) in 59 if let error = error{ 60 print(error.localizedDescription) 61 return 62 } 63 print("Firebaseに正常にログインしたよ") 64 })} 65 func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!) { 66 }} 67
・12/18追記しました
コンソールに現れる[MC]から始まるエラーは、
xcode9.0へアップデートしたらアプリを実行できない(skyway)というtetatailの過去の質問と同じでした。
(コンソールのエラー画面です↓)
アプリ起動時の処理だよ 2017-12-18 12:08:02.195612+0900 SNS01[9091:773382] [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40005000 started 2017-12-18 12:08:02.195927+0900 SNS01[9091:773382] [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r) アプリを開いたよ 2017-12-18 12:08:03.463733+0900 SNS01[9091:773424] TIC Read Status [2:0x0]: 1:57 2017-12-18 12:08:03.463893+0900 SNS01[9091:773424] TIC Read Status [2:0x0]: 1:57 2017-12-18 12:08:03.471455+0900 SNS01[9091:773425] TIC Read Status [1:0x0]: 1:57 2017-12-18 12:08:03.471586+0900 SNS01[9091:773425] TIC Read Status [1:0x0]: 1:57 2017-12-18 12:08:03.472300+0900 SNS01[9091:773425] TIC Read Status [3:0x0]: 1:57 2017-12-18 12:08:03.472414+0900 SNS01[9091:773425] TIC Read Status [3:0x0]: 1:57 2017-12-18 12:08:04.016747+0900 SNS01[9091:773382] TIC Read Status [4:0x0]: 1:57 2017-12-18 12:08:04.017050+0900 SNS01[9091:773382] TIC Read Status [4:0x0]: 1:57 2017-12-18 12:08:12.416132+0900 SNS01[9091:773069] [MC] Lazy loading NSBundle MobileCoreServices.framework 2017-12-18 12:08:12.417354+0900 SNS01[9091:773069] [MC] Loaded MobileCoreServices.framework 2017-12-18 12:08:12.420550+0900 SNS01[9091:773069] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/-----------------------ここは消しています---------------------------------/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2017-12-18 12:08:16.969304+0900 SNS01[9091:773069] Could not load the "google.png" image referenced from a nib in the bundle with identifier "com.xcode22363846Win.SNS01" 2017-12-18 12:08:17.024726+0900 SNS01[9091:773069] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] instantiated view controller with identifier "LogInViewController" from storyboard "Main", but didn't get a UITableView.' *** First throw call stack: ( 0 CoreFoundation 0x000000010ac871ab __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010a31cf41 objc_exception_throw + 48 2 CoreFoundation 0x000000010acfbcb5 +[NSException raise:format:] + 197 3 UIKit 0x000000010bcb91cc -[UITableViewController loadView] + 629 4 UIKit 0x000000010b9b8495 -[UIViewController loadViewIfRequired] + 195 5 UIKit 0x000000010b9b8cf2 -[UIViewController view] + 27 6 UIKit 0x000000010c4483a9 -[_UIFullscreenPresentationController _setPresentedViewController:] + 89 7 UIKit 0x000000010b986ba7 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 133 8 UIKit 0x000000010b9cbf6a -[UIViewController _presentViewController:withAnimationController:completion:] + 3808 9 UIKit 0x000000010b9cedad __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 99 10 UIKit 0x000000010b9cf47d -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 532 11 UIKit 0x000000010b9ced0c -[UIViewController _presentViewController:animated:completion:] + 181 12 UIKit 0x000000010b9cf06b -[UIViewController presentViewController:animated:completion:] + 159 13 UIKit 0x000000010b9d43ee -[UIViewController _showViewController:withAction:sender:] + 274 14 UIKit 0x000000010bf7c643 __66-[UIStoryboardShowSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 134 15 UIKit 0x000000010c13adcb -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 279 16 UIKit 0x000000010c13ac83 -[UIStoryboardSegueTemplate _perform:] + 82 17 UIKit 0x000000010c13af4b -[UIStoryboardSegueTemplate perform:] + 157 18 UIKit 0x000000010b815275 -[UIApplication sendAction:to:from:forEvent:] + 83 19 UIKit 0x000000010b9924a2 -[UIControl sendAction:to:forEvent:] + 67 20 UIKit 0x000000010b9927bf -[UIControl _sendActionsForEvents:withEvent:] + 450 21 UIKit 0x000000010b9916ec -[UIControl touchesEnded:withEvent:] + 618 22 UIKit 0x000000010b88abbb -[UIWindow _sendTouchesForEvent:] + 2807 23 UIKit 0x000000010b88c2de -[UIWindow sendEvent:] + 4124 24 UIKit 0x000000010b82fe36 -[UIApplication sendEvent:] + 352 25 UIKit 0x000000010c172434 __dispatchPreprocessedEventFromEventQueue + 2809 26 UIKit 0x000000010c175089 __handleEventQueueInternal + 5957 27 CoreFoundation 0x000000010ac2a231 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 28 CoreFoundation 0x000000010acc9e41 __CFRunLoopDoSource0 + 81 29 CoreFoundation 0x000000010ac0eb49 __CFRunLoopDoSources0 + 185 30 CoreFoundation 0x000000010ac0e12f __CFRunLoopRun + 1279 31 CoreFoundation 0x000000010ac0d9b9 CFRunLoopRunSpecific + 409 32 GraphicsServices 0x000000010f9d99c6 GSEventRunModal + 62 33 UIKit 0x000000010b8135e8 UIApplicationMain + 159 34 SNS01 0x0000000108206127 main + 55 35 libdyld.dylib 0x000000010e6dbd81 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException




回答1件
あなたの回答
tips
プレビュー