I am using the Parse SDK for push notification in my project. I have added the code in didFinishLaunchingWithOptions:
as given on the parse.com
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
UIUserNotificationTypeBadge |
UIUserNotificationTypeSound);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
categories:nil];
[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];
its working fine, if device or simulator version is iOS 8, but its not working in iOS 6.1 ,and message appear
[UIApplication registerUserNotificationSettings:]: unrecognized selector sent to instance 0x208406c0
Can any one tell me how can i solve it?
use this code in didFinishLaunchingWithOptions method it is work in ios 6 and 7
if you want to work in ios 6,7,8 in all cases then used this code inside a didFinishLaunchingWithOptions
For iOS8: