This question is about an iOS app with an integrated UIWebView. I'm using Xcode 7.0. One of the server-loaded pages presented in the UIWebView is a file chooser, similar to:
<form action="post.jsp" id="photo" method='POST' enctype='multipart/form-data'>
<label>Photos:</label>
<input type="file" name="photo1" id="photo1" /><br/>
<input type="file" name="photo2" id="photo2" /><br/>
<button type="submit" role="button" id="fileUpload">Select Photos</button>
</form>
On iOS 8 this works as I'd expect and have seen elsewhere: When tapping the (ugly) file chooser button in the webView, the user is shown their photo library, which sends the selected photo back to the browser.
On iOS 9, this works differently, and eventually fails. When tapping the file chooser button, the user is presented with an action sheet asking them to choose between their Photos Library and iCloud. Tapping either dismisses the action sheet, but the photo library never appears (returns to the prior view). Curiously, I have one user saying they're seeing this same behavior in iOS 8.4.1 but I haven't reproduced this myself in iOS 8.
In Xcode's console I see:
Warning: Attempt to present <UIImagePickerController: 0x7fddfd8d4800> on <CustomNavigationController: 0x7fddfe053400> whose view is not in the window hierarchy!
CustomNavigationController is absolutely the NavigationController for the View Controller containing the webView.
Reveal also shows the Action Sheet in question is presented by the OS in a UIRemoteView, out of band of the application. My concern is the OS may be attempting to display the photo picker before the remote view is gone, thus out of my control to fix.
Any thoughts on this would be much appreciated.