Skip to content

Example not working on iOS #7

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

Open
k15z opened this issue Mar 20, 2025 · 3 comments
Open

Example not working on iOS #7

k15z opened this issue Mar 20, 2025 · 3 comments

Comments

@k15z
Copy link

k15z commented Mar 20, 2025

The hello world example here is currently not working on Chrome or Safari on iOS devices - the red box stays centered in the screen regardless of how you move your device. It looks like it's missing a call to:

DeviceOrientationEvent.requestPermission()
@nickw1
Copy link
Collaborator

nickw1 commented Mar 21, 2025

@k15z thanks. This is related to recent issues/PRs in the main AR.js repository which address the same problem.

If I port the fixes from the main repo to LocAR.js, would you be happy testing it on your iOS device(s)?

We're needing iOS testers so your input is very welcome!

@k15z
Copy link
Author

k15z commented Mar 22, 2025

Of course, happy to help test!

@nickw1
Copy link
Collaborator

nickw1 commented Mar 23, 2025

@k15z OK I've applied a couple of recent fixes in the main AR.js repository to LocAR.js (especially AR-js-org/AR.js#659)

Your issue, I think, was that iOS devices require that a user make a gesture before initiating the permission request.

Try it again now, it should display a dialog box informing you that the app requires access to your sensors.
You can use either the current commit on GitHub or install version 0.0.7 via npm.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants