I ran into the same problem. I found that the file upload action file is trying to double away from itself when choosing an option, which also leads to the fact that the modal object is also rejected.
The solution is to subclass the UINavigationController containing the dismissViewControllerAnimated and override the dismissViewControllerAnimated to ignore it unless it actually has a presentedViewController .
Same:
override func dismissViewControllerAnimated(flag: Bool, completion: (() -> Void)?) { if (self.presentedViewController != nil) { super.dismissViewControllerAnimated(flag, completion: completion) } }
If you are not using a navigation controller, simply override this method in webview.
source share