xcodeを触り始めて半年の高校1年生です。
前提・実現したいこと
テニスのスコアを手動でカウントできるようなシステムを作っています。
設定画面でバージョンを表示できるようにしている時にビルドし、バージョンを見ることができる設定ボタンを押すと以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
Thread 1: signal SIGABRT
該当のソースコード
swift
1 override func viewDidLoad() { 2 super.viewDidLoad() 3 // バージョン 4 if let version: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String { 5 versionLabel.text = version 6 } 7}
試したこと
↑のコードを書き込み、入力ミスがないか確認するということだけしか自分の力不足で、できることがない現状です。自分の理解力がなくどのサイトを見てもよくわからない状況なのでどなたか力を貸してください。
Consoleに表示されているエラーメッセージを書いて下さい。
2019-01-09 09:08:56.730817+0900 tennis score[1371:66196] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-01-09 09:08:56.821579+0900 tennis score[1371:66196] [framework] CUIThemeStore: No theme registered with id=0
2019-01-09 09:08:58.784919+0900 tennis score[1371:66196] Unknown class _TtC12tennis_score13configuration in Interface Builder file.
2019-01-09 09:08:58.809005+0900 tennis score[1371:66196] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewController 0x7ff064404990> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key deuce.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010b8a729b __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010ae43735 objc_exception_throw + 48
2 CoreFoundation 0x000000010b8a6e09 -[NSException raise] + 9
3 Foundation 0x000000010a8700b4 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKitCore 0x000000010f522532 -[UIViewController setValue:forKey:] + 87
5 UIKitCore 0x000000010f1ebada -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x000000010b892ddd -[NSArray makeObjectsPerformSelector:] + 317
7 UIKitCore 0x000000010f1056d1 -[UINib instantiateWithOwner:options:] + 1814
8 UIKitCore 0x000000010f5296f2 -[UIViewController _loadViewFromNibNamed:bundle:] + 383
9 UIKitCore 0x000000010f52a07c -[UIViewController loadView] + 177
10 UIKitCore 0x000000010f3baccc -[UITableViewController loadView] + 83
11 UIKitCore 0x000000010f52a38e -[UIViewController loadViewIfRequired] + 175
12 UIKitCore 0x000000010f52abe0 -[UIViewController view] + 27
13 UIKitCore 0x000000010f786a89 -[_UIFullscreenPresentationController _setPresentedViewController:] + 89
14 UIKitCore 0x000000010f15b5dd -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 133
15 UIKitCore 0x000000010f53dc4d -[UIViewController _presentViewController:withAnimationController:completion:] + 3713
16 UIKitCore 0x000000010f5409eb __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 99
17 UIKitCore 0x000000010f541079 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 511
18 UIKitCore 0x000000010f540951 -[UIViewController _presentViewController:animated:completion:] + 173
19 UIKitCore 0x000000010f540c90 -[UIViewController presentViewController:animated:completion:] + 150
20 UIKitCore 0x000000010f545e9a -[UIViewController _showViewController:withAction:sender:] + 274
21 UIKitCore 0x000000010f2f7b80 __66-[UIStoryboardShowSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 134
22 UIKitCore 0x000000010f2f7625 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 276
23 UIKitCore 0x000000010f2f74e3 -[UIStoryboardSegueTemplate _perform:] + 82
24 UIKitCore 0x000000010f2f77a5 -[UIStoryboardSegueTemplate perform:] + 157
25 UIKitCore 0x000000010edfd7c3 -[UIApplication sendAction:to:from:forEvent:] + 83
26 UIKitCore 0x000000010ef35e85 -[UIControl sendAction:to:forEvent:] + 67
27 UIKitCore 0x000000010ef361a2 -[UIControl _sendActionsForEvents:withEvent:] + 450
28 UIKitCore 0x000000010ef350e6 -[UIControl touchesEnded:withEvent:] + 583
29 UIKitCore 0x000000010f610334 -[UIWindow _sendTouchesForEvent:] + 2729
30 UIKitCore 0x000000010f611a30 -[UIWindow sendEvent:] + 4080
31 UIKitCore 0x000000010ee17e10 -[UIApplication sendEvent:] + 352
32 UIKitCore 0x000000010ed500d0 __dispatchPreprocessedEventFromEventQueue + 3024
33 UIKitCore 0x000000010ed52cf2 __handleEventQueueInternal + 5948
34 CoreFoundation 0x000000010b80ab31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
35 CoreFoundation 0x000000010b80a3a3 __CFRunLoopDoSources0 + 243
36 CoreFoundation 0x000000010b804a4f __CFRunLoopRun + 1263
37 CoreFoundation 0x000000010b804221 CFRunLoopRunSpecific + 625
38 GraphicsServices 0x00000001149911dd GSEventRunModal + 62
39 UIKitCore 0x000000010edfc115 UIApplicationMain + 140
40 tennis score 0x000000010a509814 main + 68
41 libdyld.dylib 0x000000010dc8d551 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
回答3件
あなたの回答
tips
プレビュー