質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

Q&A

解決済

1回答

5726閲覧

Thread 1: signal SIGABRTでページが遷移しない

退会済みユーザー

退会済みユーザー

総合スコア0

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Xcode

Xcodeはソフトウェア開発のための、Appleの統合開発環境です。Mac OSXに付随するかたちで配布されています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

0グッド

0クリップ

投稿2017/12/17 08:49

編集2017/12/18 03:49

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

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

fuzzball

2017/12/18 00:51

どこで落ちているのか(どこまで処理が実行されているのか)特定して下さい。
退会済みユーザー

退会済みユーザー

2017/12/18 03:16 編集

ありがとうございます。追記しました。[MC]から始まるエラーは、[xcode9.0へアップデートしたらアプリを実行できない(skyway)](https://teratail.com/questions/93533)というtetatailの過去の質問と同じでした。他の箇所も只今確認します。
退会済みユーザー

退会済みユーザー

2017/12/18 03:32

画像を追記しました。
fuzzball

2017/12/18 03:42

ログはテキストにして下さい。コピペ出来ません。
退会済みユーザー

退会済みユーザー

2017/12/18 03:49

すみません!テキストに修正しました。
guest

回答1

0

ベストアンサー

swift

1class LogInViewController: UITableViewController, GIDSignInUIDelegate {

UITableViewControllerではなく、UIViewControllerではないでしょうか?

投稿2017/12/18 04:45

fuzzball

総合スコア16731

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2017/12/18 05:55

fuzzball様 UITableViewControllerからUIViewControllerに修正すると、クラッシュが解消し、サインアップ画面→ログイン画面に問題なく遷移しました!googleサインインのボタンをクリックできた所まで確認しました!本当にありがとうございます。 これは単にUITableViewControllerを使用していない為起きていたエラーでしょうか?
fuzzball

2017/12/18 06:12

StoryboardではUIViewController、コードではUITableViewController、という矛盾が原因です。 >>reason: '-[UITableViewController loadView] instantiated view controller with identifier "LogInViewController" from storyboard "Main", but didn't get a UITableView. UITableViewControllerなのにUITableViewを取得出来ない → Storyboard上で実際に配置されているのはUIViewControllerだから。 ということです。(たぶん)
退会済みユーザー

退会済みユーザー

2017/12/18 06:23 編集

ご指摘の通り、UITableViewControllerは使っていませんでした。 私が参考にしていたサイト [iOS で Google ログインを使用して認証する] (https://firebase.google.com/docs/auth/ios/google-signin)で、Loginビューコントローラーにはclass MainViewController: UITableViewController, GIDSignInUIDelegate { というプロトコルを実装するように書いていまして、それをそのままコピペした事により発生していたエラーだと思いました。解決に1週間程かかりましたが、その間皆様に知らない知識を教えて頂くきっかけとなり良かったです。益々アプリを作れるようになりたいです。fuzzball様、ありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問