google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.92k stars 816 forks source link

AR Button not responding embed code in Native Apps webview on IOS devices. #2453

Closed base-krchome closed 3 years ago

base-krchome commented 3 years ago

Description

AR Button not responding(not work) embed code in Native Apps for Ios devices.

AR button works in embed code which includes model viewer in Native App webview for Android Devices, but not for IOS.

Topics opened for that but it closed without solution.

My opinion this issue about native app codes.

My observation :

Model viewer ar button works on ios devices in Twitter app Model viewer ar button not works on ios devices in Instagram app Model viewer ar button not works on ios devices in Linkedln app

So it should be Native app code issue.

Can I fix this issue with javascript code in modelviewer? Should we add quicklook library to Native app?

Can you show the true way for me.

Thanks for help

Live Demo

All model viewer demos.

Version

All

Browser Affected

OS

AR

elalish commented 3 years ago

I'm not sure it's possible to launch Quick Look from the iOS Instagram or Twitter apps. Has anyone attempted this directly? If it is possible and we're simply screening for the wrong user agent string or something, that would be a simple fix. However, I have no experience with those apps, so any information you can give would be a great help.

base-krchome commented 3 years ago

we send message "modelviewer AR link" to each other on these apps. Then we opened. These apps open the link without leaving the app(Webview)

On Android devices, everything works fine. ON IOS devices,

AR button works on Twitter webview.. but not on instagram.

So twitter someway opens the quicklook in their webview but instagram doesn't..

canberka commented 3 years ago

Facebook for iOS User-Agent string

Twitter for iOS User-Agent string

Safari for iOS User-Agent string

So twitter's user agent looks like Safari, thats why it works... I dont know @elalish and model viewer team can handle with it

elalish commented 3 years ago

Hmm, I take it back; we're not narrowing it down by user agent string in this case. I believe this is what's failing, in which case the browser really doesn't support AR, though I don't know why. Old version? If anyone can debug and verify that, it would be great. Or really any kind of repro steps to test the facebook browser.

sercandemirtas commented 3 years ago

Here you go.. @elalish @canberka

"EVİNDE GÖRÜNTÜLE" means view in your space..(AR button)

Button disappears and comes back when clicked.

This is debug; ("Touch down at" is when we clicked button)

Path 1: Touch down at 222.0, 589.0, offset=0.00s Touch up at 222.0, 589.0, offset=0.10s. Jun 7 21:19:01 IPhone-11-Pro-IO-UK-10 backboardd(CoreBrightness)[66] : invalid parameters Jun 7 21:19:01 IPhone-11-Pro-IO-UK-10 Karaca(WebKit)[38474] : Single tap identified. Request details on potential zoom. (0x11b89fa00) Jun 7 21:19:01 IPhone-11-Pro-IO-UK-10 nearbyd[19073] : onHIDEvent HIDServiceClient is nil <XCSynthesizedEventRecord 'tap'> Path 1:

https://user-images.githubusercontent.com/68244546/121079524-ea28a280-c7e2-11eb-83cb-27e204e0b997.mp4

and this is app webview for ios...

ourapp-agent

I hope this helps

canberka commented 3 years ago

Hmm, maybe it is all about privacy for not open the AR, as same as webxr not opened in wkwebview.

sprengerst commented 3 years ago

👍🏻+1 for a solution. :)

canberka commented 3 years ago

there is no solution for Wkwebview, only works UIWebview with SafariServices @sprengerst which is works on Twitter

sprengerst commented 3 years ago

@canberka Thanks for theinfo. Is there any event that is triggered the browser is not capable of launching AR? The "failed" event doesn't seem to be triggered.