SO I am creating an iOS app that involves allowing the user to be able to receive push notifications. I already have the following code in my appDelegate didFinishLaunchingWithOptions.
if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)])
{
// iOS 8 Notifications
[application registerUserNotificationSettings: [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[application registerForRemoteNotifications];
}
So far so good, however, i would like to create an initial view controller that only shows on first launch, it will hopefully explain and justify to the user why it need the ability to send the user push notifications, they can then press continue and it will ask them by executing the code above. This would hopefully only happen on the first launch. Any suggestions?
Thanks
Aucun commentaire:
Enregistrer un commentaire