因此,我的代码有问题。
它可以在iOS8上流畅运行,但是当我运行iOS7.1模拟器或通过iOS7.1手机运行它时,出现此错误。
*** First throw call stack:
(
0 CoreFoundation 0x004dd1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01afc8e5 objc_exception_throw + 44
2 CoreFoundation 0x0057a243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x004cd50b ___forwarding___ + 1019
4 CoreFoundation 0x004cd0ee _CF_forwarding_prep_0 + 14
5 testapp 0x00062e29 _TFC4hp2m14ViewController11viewDidLoadfS0_FT_T_ + 633
6 testapp 0x00063392 _TToFC4hp2m14ViewController11viewDidLoadfS0_FT_T_ + 34
7 UIKit 0x00d0133d -[UIViewController loadViewIfRequired] + 696
8 UIKit 0x00d015d9 -[UIViewController view] + 35
9 UIKit 0x00c21267 -[UIWindow addRootViewControllerViewIfPossible] + 66
10 UIKit 0x00c215ef -[UIWindow _setHidden:forced:] + 312
11 UIKit 0x00c2186b -[UIWindow _orderFrontWithoutMakingKey] + 49
12 UIKit 0x00c2c3c8 -[UIWindow makeKeyAndVisible] + 65
13 UIKit 0x00bdcbc0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
14 UIKit 0x00be1667 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
15 UIKit 0x00bf5f92 -[UIApplication handleEvent:withNewEvent:] + 3517
16 UIKit 0x00bf6555 -[UIApplication sendEvent:] + 85
17 UIKit 0x00be3250 _UIApplicationHandleEvent + 683
18 GraphicsServices 0x037c2f02 _PurpleEventCallback + 776
19 GraphicsServices 0x037c2a0d PurpleEventCallback + 46
20 CoreFoundation 0x00458ca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
21 CoreFoundation 0x004589db __CFRunLoopDoSource1 + 523
22 CoreFoundation 0x0048368c __CFRunLoopRun + 2156
23 CoreFoundation 0x004829d3 CFRunLoopRunSpecific + 467
24 CoreFoundation 0x004827eb CFRunLoopRunInMode + 123
25 UIKit 0x00be0d9c -[UIApplication _run] + 840
26 UIKit 0x00be2f9b UIApplicationMain + 1225
27 testapp 0x0006cd9e top_level_code + 78
28 testapp 0x0006cddb main + 43
29 libdyld.dylib 0x023db6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
该错误发生在appdelegate的第一行:
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
我的应用程序导入了corelocation,基础和联系人列表。
最佳答案
检查ViewController
(viewDidLoad
方法)中调用的所有方法,您可能只有在iOS8上可用的选择器。
要检查可用性,您可以右键单击该方法并检查文档。
这是showViewController:sender:
方法的示例。
关于ios - Xcode:线程1:信号SIGABRT,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29428749/