1
UILocalNotification
は、アプリケーションの起動後1分を予定しています。これは、私が使用しているコードですUILocalNotificationサウンドが再生されない
-(void)scheduleNotification{
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.fireDate = [NSDate dateWithTimeIntervalSinceNow:60];
localNotif.alertBody = @"Test";
localNotif.alertAction = @"View";
localNotif.soundName=UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
[localNotif release];
}
alertViewは、適切な時間が経過した後に表示されますが、サウンドが再生されていません。 何か不足していますか?事前に
おかげ
編集 は、私は今、シミュレータ上でお使いのMacのサウンドを再設定
[UIAlertViewを表示するときにローカル通知のデフォルト音を鳴らしますか?](http://stackoverflow.com/questions/3277811/play-local-notification-default-sound-when-displaying-uialertview) –
これを見たい:http://stackoverflow.com/questions/23532706/why-doesnt-my-uilocalnotification-play-any-sound – frank