Custom notification sound not playing iOS objective c -
i'm trying localnotification
play custom sound cannot work. have declared , double check file type not work. file called alarm clock.caf
, it's added file , 29.4 seconds long, fits guidelines. , localnotification
code:
-(void) schedulelocalnotificationwithdate:(nsdate *)firedate { uilocalnotification *notification = [[uilocalnotification alloc] init]; notification.firedate = firedate; notification.alertbody = @"hello!"; notification.soundname = @"alarm-clock.caf"; notification.applicationiconbadgenumber = 0; [[uiapplication sharedapplication] schedulelocalnotification: notification];
how play?
thanks
sometimes there glitch stops working if long if it's under limit. try shortening , renaming no spaces or capital letters notifsound
. hope works!
Comments
Post a Comment