Interesting.

I tested it on iPhone and it was never called.

But on iPad, I managed to get "scene is now in the background!" printed on the first launch.

I thought the print statement might not have worked in the background/while inactive, so I tried saving the scene phase to UserDefaults inside .onChange. It also didn't work.

But according to Apple, .onChange should be working. And it probably is, but I couldn't figure out a way to test it.

I'll let you know if I get any new developments. Thanks for the comment!

I like reading manga and writing about Swift. Check out my app, Find — search text in real life! apple.co/3jFUFvt

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store