1
votes

Hi guys i added sound file(mp3) to bundle and its working fine when i received push notification till iOS 9.2 but after updating to iOS 10.0.1 the latest iOS version tone is not playing

some one please help me with this problem

Found solution before iOS 10.0.1 mp3 file is working but in iOS 10.0.1 mp3 is not working aiff format is working

1
try to add this tone file to your project directlyAnton
as per the documentation file can also be in bundleMahesh M
there are two file one is msg tone and other is ringer tone(29 seconds) small msg tone is working fine but ringer tone is not taking mobile custom tone is playingMahesh M
Try bother variants witn/without bundle. Try to check file nameAnton
can you show ur codeAnbu.Karthik

1 Answers

2
votes

As per apple

Custom alert sounds are played by the iOS system-sound facility, so they must be in one of the following audio data formats:

Linear PCM, MA4 (IMA/ADPCM), µLaw, aLaw

You can package the audio data in an aiff, wav, or caf file. Then, in Xcode, add the sound file to your project as a nonlocalized resource of the app bundle or to the Library/Sounds folder of your data container.

They does not mention MP3s.

You can use the afconvert tool to convert sounds. For example, to convert the 16-bit linear PCM system sound Submarine.aiff to IMA4 audio in a CAF file, use the following command in the Terminal app:

afconvert /System/Library/Sounds/Submarine.aiff ~/Desktop/sub.caf -d ima4 -f caff -v