ios - UILocalNotification sound settings in iPad simulator -
i'm testing app on ipad simulator. have problem notification sound play.
notification sound played when app running on foreground, not on background. shows banner type notification without sound. i'm wondering if notification settings in ipad simulator determine situation. iphone's settings app has 'notifications' menu , can set notification types-none,banner,alert- , sound etc. can't figure out ipad device settings app because don't have ipad :(
the iphone simulator , iphone device work properly. not ipad simulator.
-(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]; }
is there way figure out ipad simulator notification sound problem? or can ignore problem , ok?
try defining full path mp3 file:
localnotif.soundname = [[nsbundle mainbundle] pathforresource:@"sound" oftype:@"mp3"];
it might you.
Comments
Post a Comment