I have a couple of projects developed using ARKit 1.5 and it was working fine till iOS 11.4.1. When I upgraded my iOS to Version 12 beta and ran it using Xcode 10 beta (the latest version till date), my AR session became very unresponsive and freezes.
This freezing is even bad for projects where I have used OverlaySKScene
for my ARSceneView
. Is this a bug that I should file or only occurs to me and I should do some code optimization? If so, please help me with ideas on how to optimize the performance.
I read this thread ARKit 2 freezes: a bug or my misfortune? and changed my deployment target to iOS 12 but still no luck :(
Note: It is very difficult for me to completely redo the app using ARKit 2.0.
I fixed the issue. It is because I was doing a lot of extensive coding inside below renderer method. I was updating my SpriteKit
components of my SKScene in the below method.
func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {
// some stuff
}
Now replaced the code in below,
func renderer(_ renderer: SCNSceneRenderer, didRenderScene scene: SCNScene, atTime time: TimeInterval) {
// some stuff
}
Now the application stopped freezing. But still I can see some lag.