is way of knowing if user declined push notifications permissions?
i know didregisterforremotenotificationswithdevicetoken called in case user allowed push notifications - called if didn't?
a simple method check whether notification enabled in app or not.
-(bool)checknotificationenabled { if ([[[uidevice currentdevice] systemversion] floatvalue] < 8.0) { uiremotenotificationtype types = [[uiapplication sharedapplication] enabledremotenotificationtypes]; if (types == uiremotenotificationtypenone) { return false; //notification not enabled } else { return true;//notification enabled } } else // ios 8 devices checking different { return [[uiapplication sharedapplication] isregisteredforremotenotifications]; // if return true notification enabled // if return false notification not enabled } }
Comments
Post a Comment