Reputation: 14349
I would like to enable/disable push notifications for the my app programmatically using a settings page in the app.
Is this possible / supported? If yes, appreciate any pointers on the API to use for this.
PS: I know that users can go into Settings from home screen to configure push notification for each app. But, this requirement is to implement the same inside the app.
Upvotes: 4
Views: 3542
Reputation: 22726
Alternate Solution First thought comes in mind that, you can store User's Preference to your database (online) having BOOL filed yes/no, as to send push notification you may have webservice(s) and stored User's devicetoken at somewhere in your db.
And answer to your original question you can access users settings by reading property stored at /User/Library/Preferences/
(Taken from this question).
Hope it helps.
Upvotes: 5