An app I’m working on stores the user’s info for syncing with a webservice in the settings bundle. I was able to successfully detect a change using the NSUserDefaultsDidChangeNotification notification but only while the app was in the background. If I fully closed the app and launched again it doesn’t get that notification. I know the system coalesces notifications for an app while it’s in the background but is there any way to receive when the app launches initially? If not is there a good workaround?
Thanks
An app I’m working on stores the user’s info for syncing with a webservice
Share
user defaults only change in the context of the application.
Nothing changes after you close it, and there’s nothing to notify you about when it relaunches.
Read the values you need on launch.