I'm using following code to detect these 2 (Push Notifications and Location Services)
[postvars setObject:([CLLocationManager locationServicesEnabled])?@"true":@"false" forKey:@"locationServicesEnabled"];
BOOL pushEnabled = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications];
[postvars setObject:(pushEnabled)?@"true":@"false" forKey:@"pushServicesEnabled"];
But the issue is I'm always getting true for both even If I tap Don't allow when prompted in the app. Also in settings app I checked that Location is set to Never and notifications subheading shows off. What's wrong with this code ? can anyone guide me in this.
Just checking
[CLLocationManager locationServicesEnabled]is not enough.For Notifications Check this awesome SO answer