I added Push notifications to my application. And my application works based on push notifications. When the app runs for the first time, it is showing alert whether user wants
//It's better to use the followiing instead
BOOL status = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications]; if (!status) { NSLog(@"User doesn't want to receive push-notifications"); }