Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue where website sharing link changes to usdz model link in quicklook in iOS 17.0.3 version. #4540

Open
3 of 13 tasks
jungwoolee-letsee opened this issue Oct 26, 2023 · 7 comments
Labels
flag: not model-viewer Problems that are related to our project but are ultimately some other project's issue

Comments

@jungwoolee-letsee
Copy link

Description

hello.

When you open quicklook through modelviewer in iOS 17.0.3 and click the share button, the correct link is not sent.

When sharing a link after moving to sceneviewer or quicklook through modelviewer, the URL where modelviewer operates must be shared, but strangely, when opening quicklook, there is a problem in which the asset uri of the model referenced through ios-src is transmitted.

It works correctly on Android's SceneViewer and other versions of iOS (<17). I have attached some photos of the related issue below. If you know the solution, please let me know. Thank you.

Live Demo





Code

import '@google/model-viewer/lib/model-viewer'
import { useLayoutEffect, useRef } from 'react'
import { ViewerStateType } from '@src/utils/types.ts'
import { useAppSelector } from '@src/redux/store.ts'
import hdri from '@static/media/images/photo_studio_01_1k.hdr?url'

export default function ViewerPage() {
  const viewerRef = useRef<HTMLDivElement>(null!)
  const arBtnRef = useRef<HTMLButtonElement>(null!)
  const { currentItem }: ViewerStateType = useAppSelector((state) => state.viewer)

  useLayoutEffect(() => {
    if (!currentItem) return
    viewerRef.current.setAttribute('src', currentItem.src)
    viewerRef.current.setAttribute('ios-src', currentItem.iosSrc)
  }, [currentItem])

  return (
    <div className='flex flex-col h-full w-full'>
      <model-viewer
        ref={viewerRef}
        id='model-viewer'
        ar
        ar-modes='scene-viewer quick-look'
        shadow-intensity='1'
        camera-controls
        environment-image={hdri}
        style={{ width: '100%', height: '100%' }}
      >
        <button slot='ar-button' id='ar-button' ref={arBtnRef} style={{ display: 'none' }}>
          View in your space
        </button>
      </model-viewer>
    </div>
  )
}

Version

  • model-viewer: v3.2.1

Browser Affected

  • Chrome, version: xx.x.xxxx.xx
  • Edge
  • Firefox
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows

AR

  • WebXR
  • SceneViewer
  • QuickLook
@elalish elalish added the flag: not model-viewer Problems that are related to our project but are ultimately some other project's issue label Oct 26, 2023
@elalish
Copy link
Collaborator

elalish commented Oct 26, 2023

Since it worked on previous versions of iOS, this sounds like a Quick Look regression. There's nothing I can do about that besides ask @grorg to fix it. I'd also recommend filing a bug on WebKit (quicklook bugs often get fixed there).

@milesgreen
Copy link
Contributor

Definitely an iOS ARQL regression.

Reported:
https://bugs.webkit.org/show_bug.cgi?id=263878

Workaround:

  • This can be somewhat mitigated by using the canonicalWebPageURL USDZ parameter.
  • But note that there is an existing bug that limits the effectiveness of canonicalWebPageURL when originating HTML page has multiple query parameters (https://bugs.webkit.org/show_bug.cgi?id=248219)

@vortice3D
Copy link

vortice3D commented Oct 30, 2023

Hi there, @milesgreen:

As you've stated, some important issues just have appeared on iOS 17.X, directly related with the way the new bundled Safari version is managing the URL of USDZ/.Reality files. Same files are processed flawless in iOS16 and below.

As said in this other thread, hosting in my server a no-doubt-well-formed AR file, as is the "CosmonautSuit_en.reality" from Apple's examples (https://developer.apple.com/augmented-reality/quick-look/) is showing the annoying "Object requires a newer version of iOS." message, even when I'm running iOS 17.1 in my iPad. That is, the very last available version.

Please note that this warning message only appears when accessing the file from an HTML anchor tag, this way:

<a rel="ar" href="https://artest.myhost.com/CosmonautSuit_en.reality">
   <img class="image-model" src="https://artest.myhost.com/cosmonaut.png" alt="">
</a>

...but not when accessing directly the URL typing it in the Safari navigation editbox.

Best regards.

@milesgreen
Copy link
Contributor

Share URL regression is still an issue in iOS 17.2 Beta 3 (21C5046c)

@gwendall
Copy link

still an issue

@milesgreen
Copy link
Contributor

Default share link is still an issue in iOS 17.5 beta.
Best bet is to start relying on canonicalWebPageURL at this point.

@milesgreen
Copy link
Contributor

@AdaRoseCannon - another lingering iOS ARQL issue for you...

This has been reported on WebKit Bugzilla here:
https://bugs.webkit.org/show_bug.cgi?id=263878

Reported via Feedback Assistant (FB13608976)


When tapping the Share link (top right) from ARQL, prior to iOS17, this would share the originating HTML page URL by default.

Since iOS 17, this shares the URI directly to the USDZ itself.

Repro:

This becomes even more noticeable when viewing a USDZ blob.

In this case the Share URL is the blob ID string.

This cannot be interpreted successfully by any app or person it is shared too.

Repro:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: not model-viewer Problems that are related to our project but are ultimately some other project's issue
Projects
None yet
Development

No branches or pull requests

5 participants