canActivateAR returns false positive in iOS WKWebView #3528
-
DescriptionWhen loading ModelViewer in an iOS WKWebView (EG, Facebook / Instagram / LinkedIn embedded browser),
By default, WKWebView does not support opening USDZs in QuickLook. But there is a bug whereby testing This makes it impossible to do reliable feature detection and results in the ModelViewer AR button being displayed in a context that it's not compatible with. Issue is logged on WebKit Bugzilla: Apparently a fix is going in to iOS 16 so that WKWebView will only return Live DemoView any ModelViewer content inside an iOS WKWebView (EG, Facebook, Instagram, LinkedIn): Version
Browser Affected
OS
AR
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 11 replies
-
It's worth adding, some iOS apps do support viewing USDZ from WKWebView (EG, Chrome browser) because they went the extra mile to implement support. |
Beta Was this translation helpful? Give feedback.
-
@grorg - might be of interest. But I think it's being / been dealt with on the Apple side. |
Beta Was this translation helpful? Give feedback.
-
I think I'm going to start converting most of these "not model-viewer" issues to discussions, since there's not a lot I can do to track them here. |
Beta Was this translation helpful? Give feedback.
-
Just testing the fix for this in iOS 16.0 Beta (20A5312j) Unfortunately, the fix now means that This means that Meaning that ModelViewer in iOS 16 doesn't display an AR button in those browsers. I have added these finding to the bugzilla ticket above. @grorg is on the mailing list for the bugzilla ticket I believe. Hopefully this'll be ironed out before iOS 16 public. |
Beta Was this translation helpful? Give feedback.
-
I'm retesting this in the latest iOS 16.0 Public Beta 2 (20A5328h) in Chrome 105.0.5195.19 beta. Unfortunately This is going to break I've not been able to elicit a response from Webkit / Apple so far. If this isn't rectified, then ModelViewer compatibility checks may need to resort to user agent detection? |
Beta Was this translation helpful? Give feedback.
-
Yep - we've just become aware of this bug in |
Beta Was this translation helpful? Give feedback.
-
Sorry, I misread the bug. I believe this is correct behaviour. AR Quick Look is not supported directly in WKWebView clients (this is a bug we want to fix). Some browsers might implement their own code to intercept the navigation and display their own "Quick Look" view, but there is no API for those clients to tell the WKWebView they are doing it. So from the perspective of the WKWebView, it is correct to say it doesn't support the Again, the real solution is to allow all WKWebView clients to support ARQL (that might require some API changes too, based on the hosting UIViewController). |
Beta Was this translation helpful? Give feedback.
-
For future reference, this was addressed with: #3784 |
Beta Was this translation helpful? Give feedback.
For future reference, this was addressed with: #3784