The following piece of code returns false on iPhone XR even-though it person segmentation is working on XR.
ARConfiguration.supportsFrameSemantics(.personSegmentation)
I want to know if it does officially supports person segmentation and person segmentation with depth on XR. Just to point out I have got iOS 13.1.2 on the XR.
Try this variation:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let config = ARWorldTrackingConfiguration()
if ARWorldTrackingConfiguration.supportsFrameSemantics(.personSegmentationWithDepth) {
config.frameSemantics = .personSegmentationWithDepth
}
arView.session.run(config)
}
And make sure that your Xcode version is 11.2.1 and iOS version is 13.2.3.