感謝Crashlytics,我有報告稱我的應用在致電resignFirstResponder
時崩潰。崩潰是由於NSInternalInconsistencyException帶有消息「我們從來沒有正確設置爲在此文檔中流式傳輸」。這一崩潰似乎只發生在iPhone7和iPad上的iOS7上。該應用程序不是基於文檔的,所以我在消息中提到了文檔中的混淆。到目前爲止,我一直無法在設備或模擬器中重現問題。不幸的是,谷歌搜索錯誤消息沒有結果。崩潰總是發生在主線程和堆棧始終顯示爲:調用resignFirstResponder時可能會導致間歇性的NSInternalInconsistencyException?
0 CoreFoundation __exceptionPreprocess + 130
1 libobjc.A.dylib objc_exception_throw + 38
2 CoreFoundation +[NSException raise:format:]
3 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 90
4 UIKit -[UIDictationTestOps willEndEditingInInputDelegate:] + 138
5 UIKit +[UIDictationController keyboardWillChangeFromDelegate:toDelegate:] + 136
6 UIKit -[UIKeyboardImpl setDelegate:force:] + 206
7 UIKit -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 784
8 UIKit -[UIResponder _finishResignFirstResponder] + 136
9 UIKit -[UIResponder resignFirstResponder] + 250
...
什麼引起的問題,這將是一個很好的途徑,探索重現呢?
我看到了同樣的錯誤。我認爲Nuance SDK可能是相關的,你是否也在使用它? – perrohunter
我不是。我的應用程序中唯一的第三方代碼是Crashlytics。 –
你可以嘗試用[self.view endEditing:YES]替換resignFirstResponder; ? – OzBoz