我正在 iPad 模拟器上测试我的应用程序。但是通知声音播放有一些问题。
当应用程序在前台运行而不是在后台运行时,将播放通知声音。它显示没有任何声音的横幅类型通知。我想知道 iPad 模拟器中的通知设置是否决定了这种情况。iPhone 的设置应用程序有“通知”菜单,我们可以设置通知类型-无、横幅、警报-和声音等。我无法弄清楚 iPad 设备设置应用程序,因为没有 iPad :(
iPhone 模拟器和 iPhone 设备正常工作。但不是 iPad 模拟器。
-(void) registerNoti {
localNotif.fireDate = noti.date;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
//Payload
localNotif.alertBody = [NSString stringWithFormat:@"%@",cell.textLabel.text];
localNotif.alertAction = @"Run App";
localNotif.soundName = @"sound.mp3";
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
}
有没有办法找出 iPad 模拟器通知声音问题?或者我可以忽略这个问题,一切都好吗?