[go: nahoru, domu]

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

Are there any plans to add IOS to the support requirements? #2

Open
tichise opened this issue Jul 1, 2023 · 1 comment
Open

Are there any plans to add IOS to the support requirements? #2

tichise opened this issue Jul 1, 2023 · 1 comment

Comments

@tichise
Copy link
tichise commented Jul 1, 2023

Any plans to add iOS to the support requirements? I tried on my iPhone 14 and nothing showed up. street geometry seems to work on iOS, so I'm assuming it's technically possible.

@graphific
Copy link
graphific commented Jan 20, 2024

You actually only need to enable Scene Semantics (available for iOS at extensions 1.40+).

  1. update the arcore extensions to 1.40+ so you have the scene-semantics (semantic segmentation) also working for IOS.
  1. switch build to iOS and set up the project as usual (see here): set camera and location usage description in Project Settings > Player, enable Apple ARKit in XR Plugin management, and add your iOS API key to the ARCore extensions settings, as well as enable Semantics on iOS there.

  2. Then finally to also enable location permissions, which work differently on iOS (You'd get a Failed to configure the session with error: ErrorLocationPermissionNotGranted error otherwise)

Just create a new game object in the scene, call it "LocationMonitor" or whatever, and create a new script with a similar name (LocationMonitor.cs) to it with the following code:

public void OnEnable()
{
    Input.location.Start();
}

public void OnDisable()
{
    Input.location.Stop();
}

Turns out thats all thats really needed to make it work for iOS.

See it working on my iphone: https://twitter.com/graphific/status/1748744479832449074

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