ios - How to know when the user disables push notifications on iOS7? -
this question has answer here:
i developing app requires push notifications. detect when enabled user , when not.
it simple thing on ios8 :
uiapplication *application = [uiapplication sharedapplication]; bool enabled = application.isregisteredforremotenotifications; but how on ios7?
simple, pre ios 8:
uiremotenotificationtype types = [[uiapplication sharedapplication] enabledremotenotificationtypes]; if (types == uiremotenotificationtypenone) { // disabled }
Comments
Post a Comment