Posts

Post not yet marked as solved
0 Replies
315 Views
We noticed when using async await with SpriteKit run function. Self is retained until run action is completed which can cause memory leak.   Task {             try? await Task.sleep(nanoseconds: 2 * NSEC_PER_SEC)             await controller.startIntro()             print("intro done")         } If you deallocate controller, memory won't be released until await is not completed.  calling:  scene.removeAllActions() cause memory leak.  Here is project reproducing steps with possible workarounds:  https://github.com/maradic/SpriteKitConcurrencyBug Is this SpriteKit bug or am I doing something wrong?
Posted
by marinac.
Last updated
.
Post not yet marked as solved
0 Replies
187 Views
I found some odd behaviour of location permission. I requesting When in use permission and after that Always location permission. {"msg":"CLLocationManager", "event":"activity", "cmd":"requestWhenInUseAuthorization", "self":"0x2819d88f0"} {"msg":"CLLocationManager", "event":"activity", "cmd":"requestAlwaysAuthorization", "self":"0x2819d88f0", "SEL":"requestAlwaysAuthorization"} {"msg":"Non-#provisional WIU to Always #AuthPrompt prompt response", "ClientKey":"com.xx.xx", "GrantedStatus":"AuthorizedAlways", "BypassingSomeoneElseOnDeck":0} {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x2819d88f0", "property":"allowsBackgroundLocationUpdates", "old":0, "new":1} allowsBackgroundLocationUpdates = true pausesLocationUpdatesAutomatically = false also background modes have enabled location updates. After i go on in background, location updates are stopped. If i go in phone settings and change permission from always to when in use and back to always all works fine. Im not sure what is problem here, is there any solution to this?
Posted
by marinac.
Last updated
.