I am brand new to iOS development and finding it quite difficult to accomplish what I would think to be a fairly simple task.
I have an app that uses Parse push notifications and I would like to subscribe/unsubscribe from channels when the user makes a change to the app's preferences in the Settings application. All of the information that I have found shows how to synchronize settings once the app has been opened again but what I am hoping to accomplish is as follows:
The short question - Is there any way to register a callback in the application when a preference is changed in Settings?
Thanks!
There is nothing to "call back". If the user is working in the Settings app, your app, ex hypothesi, is not running.
When your app becomes active once again, you get an event (applicationDidBecomeActive
). Your job is to consult your NSUserDefaults to see if anything has changed, as I believe you already know.
If that isn't sufficient, then don't use a Settings bundle - provide subscribe/unsubscribe interface within your app itself.