2016-11-10 80 views
-1

我遵循「https://segment.com/」在我的iOS源代碼上實施分析用戶使用情況。但是當我用UIAlertController來顯示標題是@「」時,我的應用程序崩潰了!我不知道爲什麼。要解決它,我必須設置警報的標題爲零。這是我的日誌:段框架使UIAlertController崩潰

2016-11-10 17:12:57.185 Lightning Rider Partner[24434:236155] *** Assertion failure in -[SEGAnalytics screen:properties:options:](), /Users/dungdo/Desktop/tcourier-ios/v2_driver/Pods/Analytics/Analytics/Classes/SEGAnalytics.m:323 
2016-11-10 17:12:57.192 Lightning Rider Partner[24434:236155] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'screen name() must not be empty.' 
*** First throw call stack: 
(
    0 CoreFoundation      0x000000010c1f134b __exceptionPreprocess + 171 
    1 libobjc.A.dylib      0x00000001120f521e objc_exception_throw + 48 
    2 CoreFoundation      0x000000010c1f5442 +[NSException raise:format:arguments:] + 98 
    3 Foundation       0x0000000111cc1d79 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 
    4 Analytics       0x000000010bc29d37 -[SEGAnalytics screen:properties:options:] + 471 
    5 Analytics       0x000000010bc3fb7c -[UIViewController(SEGScreen) seg_viewDidAppear:] + 444 
    6 UIKit        0x000000010e50eb0c -[UIViewController _setViewAppearState:isAnimating:] + 945 
    7 UIKit        0x000000010e51187a __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 42 
    8 UIKit        0x000000010e50fb64 -[UIViewController _executeAfterAppearanceBlock] + 86 
    9 UIKit        0x000000010e374438 _runAfterCACommitDeferredBlocks + 653 
    10 UIKit        0x000000010e360f6f _cleanUpAfterCAFlushAndRunDeferredBlocks + 566 
    11 UIKit        0x000000010e3923da _afterCACommitHandler + 176 
    12 CoreFoundation      0x000000010c195e17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 
    13 CoreFoundation      0x000000010c195d87 __CFRunLoopDoObservers + 391 
    14 CoreFoundation      0x000000010c17ab9e __CFRunLoopRun + 1198 
    15 CoreFoundation      0x000000010c17a494 CFRunLoopRunSpecific + 420 
    16 GraphicsServices     0x0000000115145a6f GSEventRunModal + 161 
    17 UIKit        0x000000010e367964 UIApplicationMain + 159 
    18 Lightning Rider Partner    0x000000010ad74c3f main + 111 
    19 libdyld.dylib      0x00000001128a868d start + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
+0

可能重複[NSInternalInconsistencyException',原因:'無法在捆綁中加載NIB:'NSBundle](http://stackoverflow.com/questions/12722461/nsinternalinconsistencyexception-reason-could-not-load-nib-in-捆nsbun) – DaImTo

回答

0

這似乎是錯誤Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'screen name() must not be empty.

確保您已經設置了在創建SEGAnalytics類或某事的相關

1

我得到了同樣的問題,而使用段框架。

我只是評論空白屏幕的SDK文件中的Assert語句。請在您的整個項目中進行以下搜索,並對其進行評論。

NSCAssert1(screenTitle.length> 0,@「screen name(%@)must not empty」。,screenTitle);

你很好走。