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

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

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

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

Swift

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

Q&A

1回答

1395閲覧

swiftのエラーについて

yuyuhakusho

総合スコア12

Xcode

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

Swift

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

0グッド

0クリップ

投稿2020/04/26 19:34

前提・実現したいこと

ここに質問の内容を詳しく書いてください。
シュミレーターを起動したところAppDelegate.swiftにて、Thread 1: signal SIGABRTなるエラーが発生しました。
原因、解決方法を教えてください。

発生している問題・エラーメッセージ

Thread 1: signal SIGABRT

イメージ説明

該当のソースコード

swift

1import UIKit 2import IQKeyboardManagerSwift 3import Firebase 4 5@UIApplicationMain 6class AppDelegate: UIResponder, UIApplicationDelegate { 7 8 var window: UIWindow? 9 // 初期化 10 override init() { 11 super.init() 12 FirebaseApp.configure() 13 } 14 15 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 // Override point for customization after application launch. 17 IQKeyboardManager.shared.enable = true 18 return true 19 } 20 21 func applicationWillResignActive(_ application: UIApplication) { 22 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 24 } 25 26 func applicationDidEnterBackground(_ application: UIApplication) { 27 // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 } 30 31 func applicationWillEnterForeground(_ application: UIApplication) { 32 // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 33 } 34 35 func applicationDidBecomeActive(_ application: UIApplication) { 36 // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 } 38 39 func applicationWillTerminate(_ application: UIApplication) { 40 // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 } 42} 43 44 45 46 47 48

試したこと

storyboardの紐付き確認
imageが悪さをしていないか

補足情報(FW/ツールのバージョンなど)

BreakPointを置いたところは全て動きました。
動き終わった直後にエラーが出ました。

以下がビルドした時のメッセージになります。

2020-04-27 04:16:13.523576+0900 SportsCasino[2472:28400] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-04-27 04:16:13.554718+0900 SportsCasino[2472:28340] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2020-04-27 04:16:16.332250+0900 SportsCasino[2472:28495] 6.6.0 - [GoogleUtilities/AppDelegateSwizzler][I-SWZ001014] App Delegate does not conform to UIApplicationDelegate protocol.
2020-04-27 04:16:16.337074+0900 SportsCasino[2472:28495] 6.6.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60100000 started
2020-04-27 04:16:16.340210+0900 SportsCasino[2472:28495] 6.6.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2020-04-27 04:16:24.719038+0900 SportsCasino[2472:28340] [framework] CUIThemeStore: No theme registered with id=0
2020-04-27 04:16:31.834605+0900 SportsCasino[2472:28340] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SportsCasino.ViewController 0x7fc9b47127b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key emailTextField.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f3bd6fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010e961ac5 objc_exception_throw + 48
2 CoreFoundation 0x000000010f3bd269 -[NSException raise] + 9
3 Foundation 0x000000010c33f562 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 289
4 UIKitCore 0x00000001171722d2 -[UIViewController setValue:forKey:] + 87
5 UIKitCore 0x00000001173ff8fd -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x000000010f3a9d41 -[NSArray makeObjectsPerformSelector:] + 305
7 UIKitCore 0x00000001173fc643 -[UINib instantiateWithOwner:options:] + 1810
8 UIKitCore 0x00000001171793af -[UIViewController _loadViewFromNibNamed:bundle:] + 382
9 UIKitCore 0x0000000117179d39 -[UIViewController loadView] + 177
10 UIKitCore 0x000000011717a048 -[UIViewController loadViewIfRequired] + 172
11 UIKitCore 0x000000011717a868 -[UIViewController view] + 27
12 UIKitCore 0x00000001177b2c33 -[UIWindow addRootViewControllerViewIfPossible] + 122
13 UIKitCore 0x00000001177b3327 -[UIWindow _setHidden:forced:] + 289
14 UIKitCore 0x00000001177c5f86 -[UIWindow makeKeyAndVisible] + 42
15 UIKitCore 0x0000000117775f1c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4555
16 UIKitCore 0x000000011777b0c6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
17 UIKitCore 0x0000000116fc06d6 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
18 UIKitCore 0x0000000116fc8fce +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
19 UIKitCore 0x0000000116fc02ec -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
20 UIKitCore 0x0000000116fc0c48 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
21 UIKitCore 0x0000000116fbefba __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
22 UIKitCore 0x0000000116fbec71 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
23 UIKitCore 0x0000000116fc39b6 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
24 UIKitCore 0x0000000116fc4610 _performActionsWithDelayForTransitionContext + 100
25 UIKitCore 0x0000000116fc371d -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
26 UIKitCore 0x0000000116fc86d0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
27 UIKitCore 0x00000001177799a8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
28 UIKitCore 0x0000000117330dfa -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
29 FrontBoardServices 0x000000011a5bb125 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
30 FrontBoardServices 0x000000011a5c4ed6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
31 FrontBoardServices 0x000000011a5c4700 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
32 libdispatch.dylib 0x0000000110415db5 _dispatch_client_callout + 8
33 libdispatch.dylib 0x00000001104192ba _dispatch_block_invoke_direct + 300
34 FrontBoardServices 0x000000011a5f6146 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 30
35 FrontBoardServices 0x000000011a5f5dfe -[FBSSerialQueue _performNext] + 451
36 FrontBoardServices 0x000000011a5f6393 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
37 CoreFoundation 0x000000010f324be1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
38 CoreFoundation 0x000000010f324463 __CFRunLoopDoSources0 + 243
39 CoreFoundation 0x000000010f31eb1f __CFRunLoopRun + 1231
40 CoreFoundation 0x000000010f31e302 CFRunLoopRunSpecific + 626
41 GraphicsServices 0x0000000114d6c2fe GSEventRunModal + 65
42 UIKitCore 0x000000011777cba2 UIApplicationMain + 140
43 SportsCasino 0x0000000109c1cf9b main + 75
44 libdyld.dylib 0x000000011048a541 start + 1
45 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

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

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

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

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

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

guest

回答1

0

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SportsCasino.ViewController 0x7fc9b47127b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key emailTextField.'

なので emailTextField が Storyboard に
ちゃんとひもづいているか確認してください。

下記サイト参考です。
https://qiita.com/Atsushi_/items/f7930dd00a2c2ea464cd

クラッシュしたらログエリアで reason とワード検索するといいですよ。

投稿2020/04/26 22:27

TakuyaAso

総合スコア1361

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

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

yuyuhakusho

2020/04/27 00:43

回答ありがとうございます。 紐付きを確認したところ、問題なさそうでした。 ただemailTextFieldが悪さをしていることは間違いなさそうですよね、、、 reasonのワード検索についてのアドバイスありがとうございます!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問