-1
/*--- Setup Push Notification ---*/
//For iOS 8
if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)] && [UIApplication instancesRespondToSelector:@selector(registerForRemoteNotifications)])
{
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}
//For iOS 7 & less
else if ([UIApplication instancesRespondToSelector:@selector(registerForRemoteNotificationTypes:)])
{
UIRemoteNotificationType myTypes = UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:myTypes];
}
안녕하세요! 누군가가 나를 도울 수 있기를 바랍니다. iOS8에 대한 푸시 알림을 받으려면 코드를 업데이트했습니다. iOS8 기기에서 모든 것이 제대로 작동하지만 푸시 알림이 iOS7 기기에서 더 이상 작동하지 않는 것으로 보입니다. 내가 빠진 것이 있습니까? 도와 줘서 고마워!iOS8은 푸시 알림을받을 수 있지만 iOS7은 수신 할 수 없습니다.
감사합니다. 나 해보자. –