gpt4 book ai didi

ios - XCode:iOS 9-10与iOS 11上未捕获的NSException类型的异常

转载 作者:行者123 更新时间:2023-12-01 18:05:10 25 4
gpt4 key购买 nike

我注意到有些异常,例如NSGenericException或NSManagedObject Exceptions在iOS 11上应用程序崩溃时在输出中不包含很多细节。但是同时,如果我在iOS 9或10上运行并使它崩溃,它将包含一个很多有用的细节。

例如。在iOS 11上相同的应用,相同的崩溃:

libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

在iOS 9-10上:
2018-01-02 23:51:22.967 CafeManager[3726:130232] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x7f959a7634c0>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.  If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f61eb0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010ec6f141 objc_exception_throw + 48
2 UIKit 0x0000000110c04d67 -[UIPopoverPresentationController presentationTransitionWillBegin] + 3291
3 UIKit 0x00000001102ac3c2 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 2278
4 UIKit 0x00000001102a9d20 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 426
5 UIKit 0x0000000110137853 _runAfterCACommitDeferredBlocks + 318
6 UIKit 0x000000011012481c _cleanUpAfterCAFlushAndRunDeferredBlocks + 532
7 UIKit 0x0000000110156560 _afterCACommitHandler + 137
8 CoreFoundation 0x000000010f5c4717 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
9 CoreFoundation 0x000000010f5c4687 __CFRunLoopDoObservers + 391
10 CoreFoundation 0x000000010f5a9720 __CFRunLoopRun + 1200
11 CoreFoundation 0x000000010f5a9016 CFRunLoopRunSpecific + 406
12 GraphicsServices 0x0000000114cc1a24 GSEventRunModal + 62
13 UIKit 0x000000011012b134 UIApplicationMain + 159
14 CafeManager 0x000000010dd37747 main + 55
15 libdyld.dylib 0x0000000113d1c65d start + 1
16 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

如您所见,它确实有所作为。我错过了什么?任何调试器设置还是iOS 11相关问题?

更新:
在Apple开发人员论坛和Apple Bug记者上提出了相同的问题。到目前为止没有答案。

最佳答案

您是否有机会设置OS_ACTIVITY_MODE变量?

要检查是否设置了此变量(并将其关闭),请在Xcode 9中执行以下操作:

从Xcode菜单中选择产品->方案->编辑方案。
选择运行方案,然后在“参数”下查看。
如果看到OS_ACTIVITY_MODE变量已选中,请取消选择它。

关于ios - XCode:iOS 9-10与iOS 11上未捕获的NSException类型的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48067747/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com