Restoring "larger" ARWorldMap causes the app to crash. I am saying larger because the very same map saved earlier, with fewer anchors and feature points, does not crash and maps properly.
It seems that the size of the ARWorldMap may make a difference or rather the amount of tracked anchors and feature points.
I am not sure what made the exact difference but here is the ARWorldMap object and its specs:
<ARWorldMap: 0x281c0cb40 center=(3.393822 0.345988 7.653722) extent=(21.671013 7.832555 20.250080) | 130 anchors, 9326 features>
Tracking data: 20.4 MB
The ARWorldMap is correctly fetched from the memory and passed to the configuration:
if let map = retrieveMap() {
configuration.initialWorldMap = map
}
The app crashes precisely before it correctly maps the surroundings.
func session(_ session: ARSession, cameraDidChangeTrackingState camera: ARCamera) {
switch session.currentFrame?.worldMappingStatus {
case .some(.mapped):
print("found") // Never executes with the "faulty" map
default:
print("problem")
}
}
My situation seems to be related to this thread but not entirely. https://developer.apple.com/forums/thread/702596