WKWebview在调用文件选择器时出现新的iOS13模式崩溃

问题描述 投票:2回答:1

我在iOS13的模态视图控制器中有一个webview。当用户尝试将图像上传到Webview时,它崩溃。

这是我得到的例外:

2019-09-30 17:50:10.676940 + 0900参与[988:157733] *正在终止应用由于未捕获的异常“ NSGenericException”,原因:“您的应用程序提供了一个UIDocumentMenuViewController()。目前的特点环境,一个的modalPresentationStyle具有这种样式的UIDocumentMenuViewController是UIModalPresentationPopover。您必须提供以下位置信息通过视图控制器的弹出窗口popoverPresentationController。您必须提供一个sourceView和sourceRect或barButtonItem。如果此信息未知当您提供视图控制器时,可以在UIPopoverPresentationControllerDelegate方法-prepareForPopoverPresentation“。*第一个引发调用堆栈:(0x18926c98c 0x188f950a4 0x18cb898a8 0x18cb939b4 0x18cb914f8 0x18d283b98 0x18d2737c0 0x18d2a35940x1891e9c48 0x1891e4b34 0x1891e5100 0x1891e48bc 0x1930503280x18d27a6d4 0x1002e6de4 0x18906f460)libc ++ abi.dylib:终止于类型为NSException的未捕获异常

我不确定该在哪里设置此代表...

我制作了一个示例项目:https://github.com/ntnmrndn/WKUploadFormCrash并向苹果填写了错误报告

ios wkwebview uipopovercontroller ios13
1个回答
2
投票

我也遇到过类似的崩溃。

您可以通过将modalPresentationStyle设置为.fullScreen来修复它。

© www.soinside.com 2019 - 2024. All rights reserved.