So far I've traced the HTML used in the relevant location
It is expected that <input type="file" should be used to complete file upload or take photos/videos
<div class="ui-grid-a compose-attachment-grid $IF_PRIV_DC_FUNC $IF_PRIV_DC_FUNC_else ui-state-no-privilege-dc $$IF_PRIV_DC_FUNC">
<div class="ui-block-a compose-attachment-upload-block">
<input type="button" data-mini="true" value="$##MSG_1021##">
<input type="file" data-role="none" class="compose-attachment-upload" form="compose-upload-form" name="newfile" multiple="multiple">
</div>
<div class="ui-block-b compose-attachment-dc-block">
<input type="button" class="compose-attachment-dc" data-mini="true" value="$##MSG_1022##">
</div>
</div>
Post
Replies
Boosts
Views
Activity
Hello,
I am pleased to report that we have identified and resolved the issue related to WKWebView causing the app to crash when selecting camera or recording options during file upload.
Summary of Investigation:
To isolate the problem, we created a new project using Objective-C, where we utilized WebView to load a simple HTML test page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Input Example</title>
</head>
<body>
<h1>Select a file</h1>
<input type="file" id="fileInput" accept="image/*,video/*">
</body>
</html>
In our tests, devices running iOS 17.5.1 and 17.6.1 successfully displayed the file upload menu, and users could upload files, select images from the photo library, and use the camera/recording features without issues.
Root Cause:
Upon further review of our main project, we discovered the presence of the following code in the project:
@implementation UIImagePickerController (custom)
- (void)viewDidLoad
{
[super viewDidLoad];
self.modalPresentationStyle = UIModalPresentationCustom;
}
@end
This code snippet attempts to change the modal presentation style, which we suspect introduced a bug causing a layer-related error. This error led to the app crashing immediately after entering the camera mode.
Resolution:
We have removed or corrected the above implementation, and the issue has been resolved. The file upload functionality, including camera and recording features, is now working as expected on all tested iOS versions.
Thank you