Wicket Posted January 13, 2018 Share Posted January 13, 2018 Hi Guys,I have just come across a fairly large issue for myself, and probably others.I have just upgraded my ipad air to iOS 11, and now the camera does not work - when launching "a web app" from your home screen, the camera appears but it just shows as a black screen.It works as expected if you access your application via a Safari tab (web broswer), just not when you open it via a bookmarked application added to your home screen.This is a large issue, as customers like and use the application as an app - it opens into its own full screen window.Here is some background reading from stack overflow - https://stackoverflow.com/questions/46228218/how-to-access-camera-on-ios11-home-screen-web-appIt seems their isn't much anyone can do - so I guess I am asking in vain - Anyone have any ideas?The only thing I can think of is using firemonkey ios application and having a TBrowser to host the web URL, unfortunately I do not have the mobile add on for delphi professional.I would be really thankful if someone could test this for me, I just need to know if the camera is still accessible (eg not just a blank screen)(Then I can consider buying the mobile add-on for delphi)Thanks for any help.*Edit1* - does anyone know if it's possible to manually remove meta tags, one solution to this problem as per stack overflow isremoving <meta name="apple-mobile-web-app-capable" content="yes"> so your 'app' runs in a normal Safari tab, where getuserMedia is accessible.This is really quite a serious issue for me and my customer base. *Edit 2* I am using FileUpload.Execute; to access the camera I am currently using uni gui version 1.0.0.1420 Link to comment Share on other sites More sharing options...
Sherzod Posted January 13, 2018 Share Posted January 13, 2018 Hi, Maybe this solution can help you: function window.beforeInit(sender, config) { Ext.onReady(function() { var removeElementByName = function(elName) { var appleEls = document.getElementsByName(elName); var l = appleEls.length; for (i = 0; i < l; i++) { var el = appleEls[0]; Ext.removeNode(el); } }; removeElementByName('apple-mobile-web-app-capable'); }); } Link to comment Share on other sites More sharing options...
Wicket Posted January 13, 2018 Author Share Posted January 13, 2018 Hi Delphi Developer, Thanks for giving me the code for the work around - this now allows me to still "save to home screen" as before and launch the app into safari.- exactly, as per the stackoverflow answer. If anyone comes across this I added the code above on my login screen uni events > window before init. It works exactly as expected. Lets hope apple fix this issue ASAP! Thanks once again! Link to comment Share on other sites More sharing options...
Wicket Posted April 26, 2018 Author Share Posted April 26, 2018 Just incase anyone looks at this, apple fixed the issue in 11.3 you can now use the camera from a web application. Sent from my Pixel using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts