Search code examples
xcodereact-nativepush-notificationvisual-studio-app-center

add custom sound mp3 in xcode


I'm build react native app and I'm looking to change notification sound to custom sound I have in format mp3. in appcenter docs I read that I need to add the new sound into Library/Sounds

sound: Add this key when you want the to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app’s data container. If the sound file cannot be found, or if you specify default for the value, the system plays the default alert sound.

in xcode when I open my project I don't see any folder called Library or Library/sounds. and I'm not sure where to create it. I have Libraries folder and there is fonts inside it without any folder.


Solution

  • Refer this blog: https://medium.com/@prakashmaharjan20/play-custom-push-notification-sound-ios-a767748a46

    You can't use .mp3 file for ios, you can use .caf file