【问题标题】:Xcode: Thread 1: signal SIGABRTXcode:线程 1:信号 SIGABRT
【发布时间】:2015-04-03 08:25:51
【问题描述】:

所以,我的代码有问题。 它在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、foundation 和联系人列表。

【问题讨论】:

    标签: ios xcode swift sigabrt


    【解决方案1】:

    检查在您的ViewControllerviewDidLoad 方法)中调用的所有方法,您可能有一个仅适用于 iOS8 的选择器。

    要检查可用性,您只需右键单击方法并查看文档。

    这是showViewController:sender: 方法的示例。

    【讨论】:

    • 您的回答解决了这个问题,非常感谢。不幸的是,该应用还有其他问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多