Mohamed Mahyoub
Mohamed Mahyoub

Reputation: 391

Where to put custom sound file on Ionic 4 for OneSignal Push Notification?

I have seen a few other questions where it says platforms/ios/res/raw/

but in my Ionic 4 app I don't have the folder res/raw/

Upvotes: 0

Views: 729

Answers (1)

Mostafa Harb
Mostafa Harb

Reputation: 1675

platforms/ios/res/raw/ is not in your ionic app , its in ios directory after build, so in your config.xml :

<platform name="ios"> 
    <resource-file src="resources/music/mp3 file name.mp3" target="res/raw/mp3 file name.mp3" /> 
</platform>

Here note that in resources folder you create a folder named music and add the mp3 notfication sound in it and will be included in the resource-file i mentioned up.

And the same for android you'll ad resource file inside android but you will specify where notfication where notification will be placed inside android.

Upvotes: 1

Related Questions