2016-09-27 226 views
0

所以我正在从Sinch做一个教程!关于如何获取和呼叫联系人, 那么它加载联系人就好了。 问题是,无论何时我选择联系人进行调用,应用程序崩溃,Xcode都会在控制台上显示此错误。 任何人都可以帮助我吗?iOS联系人选取器

inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')' 
*** First throw call stack: 
(
    0 CoreFoundation      0x000000010a70634b __exceptionPreprocess + 171 
    1 libobjc.A.dylib      0x000000010a08821e objc_exception_throw + 48 
    2 SinchAppToPhoneTutorial    0x0000000108cca77b SINCallOrderByStartTimeComparator + 66724 
    3 SinchAppToPhoneTutorial    0x0000000108cb1c6b _ZN6rebrtc13OfflineInvite6encodeERKS0_PhmPm + 4418449 
    4 SinchAppToPhoneTutorial    0x0000000108cc4d45 SINCallOrderByStartTimeComparator + 43630 
    5 SinchAppToPhoneTutorial    0x0000000108cc496c SINCallOrderByStartTimeComparator + 42645 
    6 SinchAppToPhoneTutorial    0x00000001088268e9 -[DetailViewController initSinchClient] + 89 
    7 SinchAppToPhoneTutorial    0x0000000108825e8a -[DetailViewController viewDidLoad] + 234 
    8 UIKit        0x000000010accb06d -[UIViewController loadViewIfRequired] + 1258 
    9 UIKit        0x000000010acd14d6 -[UIViewController __viewWillAppear:] + 118 
    10 UIKit        0x000000010acfc393 -[UINavigationController _startCustomTransition:] + 1290 
    11 UIKit        0x000000010ad0d008 -[UINavigationController _startDeferredTransitionIfNeeded:] + 697 
    12 UIKit        0x000000010ad0e19b -[UINavigationController __viewWillLayoutSubviews] + 58 
    13 UIKit        0x000000010af051b7 -[UILayoutContainerView layoutSubviews] + 223 
    14 UIKit        0x000000010abee344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237 
    15 QuartzCore       0x000000010e03bcdc -[CALayer layoutSublayers] + 146 
    16 QuartzCore       0x000000010e02f7a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366 
    17 QuartzCore       0x000000010e02f61e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 
    18 QuartzCore       0x000000010dfbd62c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280 
    19 QuartzCore       0x000000010dfea713 _ZN2CA11Transaction6commitEv + 475 
    20 UIKit        0x000000010ab54878 _afterCACommitHandler + 346 
    21 CoreFoundation      0x000000010a6aae17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 
    22 CoreFoundation      0x000000010a6aad87 __CFRunLoopDoObservers + 391 
    23 CoreFoundation      0x000000010a68fb9e __CFRunLoopRun + 1198 
    24 CoreFoundation      0x000000010a68f494 CFRunLoopRunSpecific + 420 
    25 GraphicsServices     0x000000010e959a6f GSEventRunModal + 161 
    26 UIKit        0x000000010ab29f34 UIApplicationMain + 159 
    27 SinchAppToPhoneTutorial    0x00000001088257bf main + 111 
    28 libdyld.dylib      0x000000010c4fe68d start + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
(lldb) 
+0

最新的iOS版本? –

+0

即时通讯使用Xcode 8,但iOS部署目标为8.3,代码位于Objective-C –

回答

0

它说,在最高层

inchAppToPhoneTutorial[1143:42160] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Parameter 'applicationKey' is invalid (was '')' 

发生了什么事那么找出你所呼叫的东西利用了applicationKey并找出为什么它是空白:)