如上所述,在我参加的其中一个课程中,当我运行我的项目时,模拟器会打开应用程序,该应用程序似乎是空白的。 我已经审查了许多与我有同样问题的人的帖子,我尝试了他们的解决方案。
我审核的解决方案是: - 删除模拟器的所有内容 - 更改了模拟器的类型(从iPhone 8 plus到iPhone 7 plus) - 确保我在Info.plist上有正确的设置 - 从头开始构建不同时间的新程序。 还有其他我甚至都不记得了。
我附加了我的文件,以及我的模拟器启动应用程序时打开的页面。 (最后一次截图)
2018-06-18 22:52:29.685489+0200 Bullseye[2247:47563] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Bullseye.ViewController 0x7fc0df70bf90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key numValue.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010625e1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x0000000102665031 objc_exception_throw + 48
2 CoreFoundation 0x000000010625e0b9 -[NSException raise] + 9
3 Foundation 0x0000000102086b47 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKit 0x000000010309cec0 -[UIViewController setValue:forKey:] + 87
5 UIKit 0x000000010338ae8a -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x0000000106200e8d -[NSArray makeObjectsPerformSelector:] + 317
7 UIKit 0x0000000103389834 -[UINib instantiateWithOwner:options:] + 1856
8 UIKit 0x00000001030a40d7 -[UIViewController _loadViewFromNibNamed:bundle:] + 383
9 UIKit 0x00000001030a4a04 -[UIViewController loadView] + 177
10 UIKit 0x00000001030a4d21 -[UIViewController loadViewIfRequired] + 175
11 UIKit 0x00000001030a5574 -[UIViewController view] + 27
12 UIKit 0x0000000102f73123 -[UIWindow addRootViewControllerViewIfPossible] + 122
13 UIKit 0x0000000102f73834 -[UIWindow _setHidden:forced:] + 294
14 UIKit 0x0000000102f865cc -[UIWindow makeKeyAndVisible] + 42
15 UIKit 0x0000000102efa3da -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4739
16 UIKit 0x0000000102eff5cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
17 UIKit 0x00000001032c1f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
18 UIKit 0x0000000103694a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
19 UIKit 0x00000001032c1bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
20 UIKit 0x00000001032c23db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
21 UIKit 0x0000000103c33614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
22 UIKit 0x0000000103c334ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
23 UIKit 0x000000010391775d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
24 UIKit 0x0000000103b124b7 _performActionsWithDelayForTransitionContext + 100
25 UIKit 0x0000000103917627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
26 UIKit 0x00000001036940e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
27 UIKit 0x0000000102efdeac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
28 UIKit 0x00000001034d0bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
29 FrontBoardServices 0x000000010828d2f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
30 FrontBoardServices 0x0000000108295cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
31 libdispatch.dylib 0x00000001073c27ec _dispatch_client_callout + 8
32 libdispatch.dylib 0x00000001073c7db8 _dispatch_block_invoke_direct + 592
33 FrontBoardServices 0x00000001082c1470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
34 FrontBoardServices 0x00000001082c112e -[FBSSerialQueue _performNext] + 439
35 FrontBoardServices 0x00000001082c168e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
36 CoreFoundation 0x0000000106200bb1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
37 CoreFoundation 0x00000001061e54af __CFRunLoopDoSources0 + 271
38 CoreFoundation 0x00000001061e4a6f __CFRunLoopRun + 1263
39 CoreFoundation 0x00000001061e430b CFRunLoopRunSpecific + 635
40 GraphicsServices 0x0000000108b56a73 GSEventRunModal + 62
41 UIKit 0x0000000102f01057 UIApplicationMain + 159
42 Bullseye 0x0000000101d5bad7 main + 55
43 libdyld.dylib 0x000000010743f955 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)