RadiantReasons
RadiantReasons

Reputation: 33

Is it possible to pass data from the View Hieracrchy to the App Delegate without using a Singleton?

I want to access data that is populated into Environment Objects during the lifetime of my application in my AppDelegate's applicationWillTerminate() function.

I've looked around Stack Overflow and elsewhere and the only pattern that seems viable is a gobally accessible variable.

Is there another way to get data from the EnviromentObject into the App Delegate function?

I guess I'd be open to aquiring the data in life cycle functions before applicationWillTerminate() if that's an option. I haven't done that, it would require a fair amount of restructuring, but I'll definitely do it if that is suggested.

Regardless, is there another way to do this? I see other scenarios in which this might be useful.

Upvotes: 0

Views: 52

Answers (0)

Related Questions