2

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.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
Mubashir Ali
  • 349
  • 1
  • 10

1 Answers1

1

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.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
  • 1
    I was using **ARConfiguration** for checking the support. I needed to use **ARWorldTrackingConfiguration** to check the support. – Mubashir Ali Nov 21 '19 at 07:38
  • 1
    `ARConfiguration` is a base class for all types of configurations in ARKit, but `ARWorldTrackingConfiguration` is a main one with six degrees of freedom. – Andy Jazz Nov 21 '19 at 07:44