Post

Replies

Boosts

Views

Activity

WebView Upload File Can't Use Camera/Video
以下是包含完整日誌的回報範本: Title: WKWebView File Upload Causes App Crash When Selecting Camera or Recording Options Body: Hello, I am experiencing a critical issue with WKWebView in our iOS app when handling file uploads. We are using the following HTML element to allow users to capture images or videos, select from their photo library, or choose a file from the file system: <input type="file" accept="image/*;capture=camera" id="cameraInput"> Issue Description: When a user selects the camera or recording option, the app immediately crashes and returns to the WKWebView screen. This issue does not occur when selecting a file from the photo library or file system. Logs: Below are the relevant logs captured when the issue occurs: Presenting view controller <_UIContextMenuActionsOnlyViewController: 0x1034349e0> from detached view controller <MailVwCtl: 0x103838800> is not supported, and may result in incorrect safe area insets and a corrupt root presentation. Make sure <MailVwCtl: 0x103838800> is in the view controller hierarchy before presenting from it. Will become a hard exception in a future release. RotateN2:<MailVwCtl: 0x103838800> RotateN2:<MailVwCtl: 0x103838800> RotateN1:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<MailVwCtl: 0x103838800> RotateN2:<MailVwCtl: 0x103838800> RotateN2:<Mail2000ViewController: 0x10350b780> RotateN1:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> Unknown chipRevisionID (0xffffffff) Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto). Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto). Attempted to change to mode Portrait with an unsupported device (BackAuto). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto). Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto). RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> WillDsAr:<MailVwCtl: 0x103838800> RotateN1:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> DidDsAr:<MailVwCtl: 0x103838800> <Mail2000ViewController: 0x10350b780>:VwWillAppear:1:x0 willAr:1,Fm:0,20,375,792-<MailVwCtl: 0x103838800> willAr:1,Bd:0,0,375,792-<MailVwCtl: 0x103838800> <MailVwCtl: 0x103838800>:VwDidAP: VwDidAP:Bd:0,0,375,792-<MailVwCtl: 0x103838800> VwDidAP:Fm:0,20,375,792-<MailVwCtl: 0x103838800> VwDiDAP:SetFm:0,20,375,792-<MailVwCtl: 0x103838800> ToolVwSetVwSize0:main,0,24,w=375,h=668,stepInd=0 ToolVwSetVwSize0:toobar_self,0,692,w=375,h=66 ToolVwSetVwSize:w=375,h=792 ToolVwSetVwSize1:main,0,0,w=375,h=727 ToolVwSetVwSize1:ToolBar,0,727,w=375,h=792 RotateN2:<Mail2000ViewController: 0x10350b780> RotateN2:<Mail2000ViewController: 0x10350b780> <Mail2000ViewController: 0x10350b780>:VwDidAppear:1:x0 M2KVC_DidAp0:0.000000 0.000000 375.000000 812.000000 Additional Context: This issue is critical as it affects the user experience severely. Notably, we have a similar issue in our Android app using WebView. In that case, the file upload options for camera, recording, and file selection do not appear at all, restricting users to only upload files from the phone's storage. We would like to inquire whether there have been recent changes to the APIs related to WKWebView and WebView or any known issues that could be causing this behavior. We are also concerned this might be a side effect of recent bug fixes or updates to WKWebView. Additional Context: This issue appears to be specific to iOS 17. We have tested the same functionality on devices running iOS versions below 17, and the camera and recording options work as expected without any crashes. This suggests that the issue may be introduced in iOS 17. You can view a video demonstrating the issue at this link: https://share.icloud.com/photos/001voevXriVXsEUmhzGsFBtSA Environment: iOS version: 17.6.1&17.5.1 Device: iPhone 15 Pro Max& iPhone 12 WKWebView version: [Your WKWebView version, if known] App platform: iOS Xcode version: 15.1 We appreciate any insights or guidance you can provide on this matter. Thank you.
2
0
752
Aug ’24