简体   繁体   中英

(iOS 11.2.5) apple-mobile-web-app-capable breaks <input type=“file”> workaround?

iOS 11.2.5 has broken the image capture button <input type="file"> for home screen (launch) icon, running in standalone mode (web capable mobile apps)...

Test case:- capture.html

<meta name="apple-mobile-web-app-capable" content="yes">
<input type="file">

To reproduce :

open capture.html in mobile safari, add to home screen, then open from home screen icon. Press choose file, select camera.

Camera opens with just a black view.

If I open capture.html in mobile safari (not from home screen icon) and use camera, it works.

If I remove apple-mobile-web-app-capable from capture.html and repeat the process of adding a home screen icon, the camera works correctly.

Question :

Does anyone have a workaround for this issue whilst retaining standalone mode (which is essential for a mobile app)?

References :

[1]: apple-mobile-web-app-capable reference

EDIT

Logged as a bug with Apple (id 36820143), who have since closed it CLOSED DUPLICATE OF 35542231:CLOSED . So hopefully it will be fixed in the next update (fingers crossed).

This has now been fixed in iOS 11.3 beta 1. :)

Release notes:

Safari Resolved Issues

  • WebApps saved to the home screen and webpages in SafariViewController can now use the camera to capture images. (35542231)

https://developer.apple.com/go/?id=ios-11.3-sdk-rn

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM