iOS 목표 c에서 알람 기본 프로젝트를 진행 중입니다. 응용 프로그램이 백그라운드에있을 때 경보로 UILocalnotification
을 구현했습니다. 하지만 내가 직면하고있는 문제는 소리가 30 초 동안 만 재생된다는 것입니다.알람 응용 프로그램에 대한 UILocalnotification이 30 초 이상
어떻게 사운드의 시간 간격을 늘리거나 UILocalnotification
대신 다른 방법으로 구현할 수 있습니까?
- (IBAction)Alert:(id)sender{
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"yyyy-MM-dd"];
//NSDate *date = [NSDate date];
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate =[NSDate dateWithTimeIntervalSinceNow:15];
localNotif.timeZone = [NSTimeZone localTimeZone];
localNotif.alertBody = @"Emergency";
localNotif.alertAction = @"View";
localNotif.soundName = @"police.mp3";
localNotif.applicationIconBadgeNumber = 1;
localNotif.repeatInterval = NSYearCalendarUnit;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
}
Note : mp3 file i am using for UILocalnotification is of more that 60min duration.
감사합니다.
그 파일을 여러 개의 30 개 사운드 파일로 분할하고 다중 알림을 보내야합니다. – Tj3n
@ Tj3n 답장을 보내 주셔서 감사합니다. 하지만 내 mp3 파일은 30 초 이상입니다. –