저는 UILocalNotification에 대한 API를 살펴 보았습니다. 나는 firedate가 부딪 칠 때 배지 번호 만 정하고 싶다. 팝업이 없습니다. 배지 번호가 1이고 알림 본문이 없기 때문에 알림을 설정하려고했습니다. 그러나이 didnt 한 일.UILocalNotifications는 배지 만 표시합니다.
//Add new local push notification
locationNotification.fireDate = date;
locationNotification.timeZone = [NSTimeZone defaultTimeZone];
//locationNotification.alertBody = [NSString stringWithFormat:body];
//locationNotification.alertAction = @"Ok";
//locationNotification.soundName = UILocalNotificationDefaultSoundName;
locationNotification.applicationIconBadgeNumber = 1;
이것이 가능합니까? 일단 앱을 열면 메시지 만 표시하려고합니다.
답장 skram을 주셔서 감사합니다, 유일한 것은 내 코드에서 누락 된 것 같습니다 사운드 이름입니다. 나는 UILocalNotificationDefaultSoundName으로 남겨 뒀다. 그러나이 didnt는 차이를 만드는 것처럼 보인다. – user987723
또한,'fireDate'의 예상 시간이 유효하다는 것을 다시 한번 확인한다. 그렇지 않으면 실제로 일어나지 않는 것을 기대할 수 있습니다. – skram
내가 경고 바디를 주석 처리하고 작동하는 경우 조치가 정상이면. 그래서 fireDate는 괜찮아요. – user987723