irmakoz
irmakoz

Reputation: 1166

Testing ARGeoTrackingConfiguration in unsupported area

I am developing an app using ARKit's ARGeoTrackingConfiguration.

I am outside of the US, so my location is not supported. I simulate a location but the CoachingState always stays at .initializing.

Is there a way to test GeoTracking apps outside of the US?

Upvotes: 1

Views: 800

Answers (2)

Andy Jazz
Andy Jazz

Reputation: 58063

Nope.

Supplementary visual data must be downloaded from Apple's server along with GPS coordinates. If your GPS coordinates are from unsupported area – there's no ARGeoAnchor.

It's even impossible if you cheat GPS. Apple uses large LiDARs to digitize surrounding environments in big cities. You need to feed the same views thru rear camera, not only longitude and latitude. So, you have to physically be in ARGeoTracking-supported place. As an alternative you might use a replay data feature.

For additional info read this post and this post.

Upvotes: 2

Dante Puglisi
Dante Puglisi

Reputation: 668

There is a way (if you know someone in a supported location).

Apple realized this was an issue and now there's a way to debug ARGeoTrackingConfiguration in unsupported areas (this can also be used to test the exact same AR experience multiple times and also test without going outside).

Stated as a Tip in ARGeoTrackingConfiguration docs:

You can share an experience of geotracking with developers who live outside an area that supports it. Record a session in your app in an area that supports localization imagery for developers to create and test their geotracking app. For more information, see Recording and Replaying AR Session Data.

When accessing that link there's a guide on how to record an AR session, basically the steps are:

  1. Download Reality Composer app from App Store on the device that's gonna record the experience (must be in supported location).
  2. Create a new project and go to Developer (inside the 3 dots menu), tap on Record AR session.
  3. Make sure Location Recording is ON (it's OFF by default).
  4. Make the recording and then tap on Share.

A .mov will be shared and it looks like a regular video but it has the sensors metadata. Once received go into your project's scheme in Xcode and add the ARKit video, make sure to have a device selected at the top (not a simulator) otherwise the ARKit option won't be shown:

enter image description here

Run the app and the video should be being used as the AR background instead of the device's camera!

P.S. If you get a black screen when using an AR session try recording another AR session with a different device

Upvotes: 3

Related Questions