Mahesh M
Mahesh M

Reputation: 85

iOS 10.0.1 push notification custom sound not playing(mp3)

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

Upvotes: 1

Views: 1566

Answers (1)

ajay_nasa
ajay_nasa

Reputation: 2298

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

Upvotes: 2

Related Questions