Issue where website sharing link changes to usdz model link in quicklook in iOS 17.0.3 version.
- Dominant language
- TypeScript
- Stars
- 8.2k
- Forks
- 947
- PR merge metrics
- No merged PRs in 30d
Description
### 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**
``` javascript
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(null!)
const arBtnRef = useRef(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 (
View in your space
)
}
```
### Version
- model-viewer: v3.2.1
### Browser Affected
- [ ] Chrome, version: xx.x.xxxx.xx
- [ ] Edge
- [ ] Firefox
- [ ] IE
- [x] Safari
### OS
- [ ] Android
- [x] iOS
- [ ] Linux
- [ ] MacOS
- [ ] Windows
### AR
- [ ] WebXR
- [ ] SceneViewer
- [x] QuickLook
Contributor guide
Assessment
This issue has not been assessed yet.