Popup appears afrer you register your application for remote notifications. For example:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
how can I know if the user selected don't allow/ allow?
Application objects calls two delegate's methods:
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *) error
{
}
UPD:
Here is tutorial on how to setup your app for push notifications: http://www.raywenderlich.com/32960/