Studio/UAR iOS Motion Permissions Not Triggered (iframe)

Hi, I’ve communicated this issue with @George and the team is currently looking into it, but just wondering if anyone else has encountered the same issue.

We are trying to iframe a Studio/UAR instant tracking experience. This works fine on Android, but on iOS devices the motion and orientation permissions pop up does not show, thus disallowing users to access the experience. We have allowed gyro/accelerometer/camera parameters in the domain’s iframe code. Works fine when the experience is directly accessed and not iframed.

Any ideas?

Thank you.

Is your iframe hosted on the same domain as the main page? Looks like iOS disallows motion events for cross-origin iframes (probably to prevent use in ads), see for example the issue here: https://github.com/google/marzipano/issues/184

The linked stackoverflow post suggests a workaround of adding some code to the main page to add the listeners and postMessage the data to the iframe - we’d need to do some platform updates to support this approach, and it’s annoying to need to add code to the main page rather than a clean embed but that looks like it might be the only iOS option at the moment.

The webkit bug (also linked from the issue above) hasn’t seen any new action since the addition of the explicit permission opt-in on iOS; I’ll try and bump that discussion again as now explicit user consent is required it seems like that should be something that they can enable in https iframes again regardless of the origin.

I’ve been digging around the webkit bug tracker a bit more and come across this discussion: https://bugs.webkit.org/show_bug.cgi?id=221399

Still reading through but it looks like webkit has recently implemented support for allowing motion data in iframes (with appropriate feature policy), and it will be available in some as-yet-unspecified future version of iOS.

Hi @simon, thanks so much for getting back to me. It seems that iOS has removed the ability to manually toggle on motion and orientation access for now.

It would be great to know if and when Zappar is able to support the listen/post approach you mentioned - I’m guessing this support would have to be implemented for the 3js SDK as well? Will keep tabs on the iOS update for now.

Thanks!

Use in an iframe is something we don’t officially support at the minute and haven’t really looked into much. Although the postMessage workaround seems easy enough to implement, we’d also need to think about the impact on our custom domain licensing business model for UAR - if we did support iframes we’d probably require both the main frame domain and the iframe domain to be licensed.

What’s your use case for the iframe approach? Is there any way you can have them on the same domain (I’m not even sure that would work, but would be interested to know)?

1 Like