Post

Replies

Boosts

Views

Activity

Reply to C++ std::stable_sort crashes on iOS 12
I've seen crashes, in the last week or so, with "new (std::nothrow) ClassName", with code built using Xcode 15.0.1, on iOS 12 and on an older version of MacOS (10.13, I think). The same binaries run fine on the latest iOS and MacOS. Removing the "(std::nothrow)" fixed the crash. The same code worked fine on all supported versions of MacOS and iOS when built with older Xcode.
Dec ’23
Reply to sceneDidEnterBackground not called from App Switcher
I didn't find a solution with SceneDelegate, so I removed it and implemented applicationDidEnterBackground instead. Not very elegant, and if I ever write an app where I really need UIScene, I will have to revisit this issue. But for my current app, using the application delegate methods gets the job done, it's saving it state the way I want it regardless of how the app is exited.
Apr ’22
Reply to sceneDidEnterBackground not called from App Switcher
This is the state that isn't handled correctly. This is after double-pressing the home button. You can't see it in the screen shot, but in this state, the app is still running, that is, the "life" algorithm is still running and continuously updating the screen. The sceneWillResignActive method was called, but sceneDidEnterBackground was not. At this point, that is all still OK, since the app is still active. But if I swipe the app upward at this point, sceneDidEnterBackground is still not getting called, and I don't understand why. In an older app of mine, where the lifecycle is managed using the AppDelegate methods, applicationDidEnterBackground is called when swiping up. And also note: if I single-press the home button while in the app, it is placed in the background, and the sceneWillResignActive and sceneDidEnterBackground are both called, as expected. (Sorry, there's supposed to be a screen shot here, but that doesn't seem to work...) [object Object]
Apr ’22