Reputation: 1166
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
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
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:
Developer
(inside the 3 dots menu), tap on Record AR session
.Location Recording
is ON
(it's OFF
by default).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:
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