Jump to content

iOS 11 camera access from "home screen" application


Wicket

Recommended Posts

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-app

It 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 is

removing 

<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

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

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

  • 3 months later...
×
×
  • Create New...