ios - Play notification sound using URL -


i want application play notification sound through url. custom sound file lies @ particular working url. so, want app use link notify user notification.

i've tried avplayer,since plays sound files through url's check this

the avplayer code working when call using [self playselectedsong] (plz check code provided in above link) in didfinishlaunchingwithoptions of appdelegate , viewdidload function of other views.

whenever notification arrives(didreceiveremotenotification) audio file url,which add avplayer,the sound isn't playing.only text notification shown.

  1. no not possible play sound on remote notification unless have on main bundle. check apple document

for remote notifications in ios, can specify custom sound ios plays when presents local or remote notification application. sound files must in main bundle of client application.

  1. even if add sound file on main bundle , file can not longer 30 seconds

custom sounds must under 30 seconds when played. if custom sound on limit, default system sound played instead.

i hope may you.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -