ARKit/Scenekit app slow on iPhone X and iOS 12

For some reason my app experience begin lagging with iPhone X and iOS 12. and become more slower overtime with the gestures panning… etc. However, if i momentary exit out of the app and go back, all of sudden works fine again. I don’t get this on older device such as iPhone 8, 7 and +. I also check memory leaks and nothing. Can you guys point me to the right direction on how I can fix this? Thanks.

@efthemiosprime Do you still have issues with this?

So, I was able to fixed it. But I’m not sure what’s cause it. What I was doing is i’m loading different .scn or scene. What I did is while i’m loading a scene, i set the sceneView to hidden. Then when it’s loaded i put a little delay before i show it.

  sceneView.isHidden = true
  DispatchQueue.global(qos: .background).async {
    guard let scene = SCNScene(named: "Models.scnassets/Steps/\(step).scn") else { fatalError("load: failed to load step scene") }
    DispatchQueue.main.async {
      self.sceneView.scene = scene

      DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: {
        self.sceneView.isHidden = false
        completion?()

      })
    }
  }

@efthemiosprime Thank you for sharing your solution - much appreciated!

This topic was automatically closed after 166 days. New replies are no longer allowed.