I have an app and I want to target the new iOS 8.1 but, I also want people who have iOS 7 to be able to use my app. So for example for my push notifications, in my app delegate I have
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
UIUserNotificationTypeBadge |
UIUserNotificationTypeSound);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
categories:nil];
[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];
} else {
// Register for Push Notifications before iOS 8
[application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeSound)];
}
To turn on push notifications for iOS 8 and iOS 7, but when I change my deployment target I get warnings saying this has been deprecated:
[application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeSound)];
What is the best way to handle this? For submission to the app store and also personally I don't like to see warnings in my code.
Thanks for the help in advance.
EDIT
Here is a picture of the warnings I see my deployment target is iOS8.1 and not sure where to find my base SDK? Here is pic: