在iOS8系统开发使用本地通知时,会出现以下的相关提示语:app
1 Attempting to schedule a local notification
2 with an alert but haven't received permission from the user to display alerts
3 with a sound but haven't received permission from the user to play sounds开发
……it
缘由在于在iOS8系统上须要注册本地通知,这样才能正常使用io
// iOS8注册本地通知select
if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)])notification
{di
[application registerUserNotificationSettings:[UIUserNotificationSettingssettingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSoundcategories:nil]];sse
}display