알림 센터에있는 모든 것을 구성하면 앱에서 알림을 표시 할 수 있으므로 내 앱의 로컬 알림은 실행되지 않습니다.iOS5에서 로컬 알림이 작동하지 않습니다.
같은 문제가 발생합니까?
자세한 내용은 :
엑스 코드 4.1과 아이폰 OS 4.3 SDK로 컴파일 며칠 전 같은 소스 코드에서 컴파일 같은 응용 프로그램은, 모든 것이 잘 작동합니다.
또한 이전 버전의 Xcode 및 iOS SDK로 컴파일 된 앱은 업그레이드 후 iOS5에서 작동 할 수 있습니다.
그러나 같은 코드로 컴파일되었지만 XCode 4.2 및 iOS5 SDK는 컴파일되지 않는 응용 프로그램이 작동하지 않습니다.
의견이 있으십니까? iOS5에 특별한 작업이 있습니까?
샘플 코드는 같은 수 있습니다 :
UIApplication *app = [UIApplication sharedApplication];
NSArray *oldNotifications = [app scheduledLocalNotifications];
// Clear out the old notification before scheduling a new one.
if (0 < [oldNotifications count]) {
[app cancelAllLocalNotifications];
}
// Create a new notification
UILocalNotification *alarm = [[UILocalNotification alloc] init];
if (alarm) {
alarm.fireDate = theDate;
alarm.timeZone = [NSTimeZone defaultTimeZone];
alarm.repeatInterval = NSDayCalendarUnit; //repeat every day
alarm.alertBody = [NSString stringWithFormat:@"alert"];
[app scheduleLocalNotification:alarm];
[alarm release];
}
감사에서 iOS 5에서 마이클
APN 서비스를 사용하려면 앱 ID 및 SSL 인증서도 구성해야합니까? – user370773
답변을 주셔서 감사합니다. 또한 UILocalNotificationDefaultSoundName은 iOS 5.0에서 몇 가지 문제가 있습니다. –