Onesignal-flutter-sdk: Folder location/path for custom notification sound files on iOS and Android

Created on 10 May 2020  路  1Comment  路  Source: OneSignal/OneSignal-Flutter-SDK

Description:
Trying to determine the location path to include custom notification sound files for iOS, but your documentation fails to include anything related to Flutter.

I have Android working properly after setting up Categories on my OneSignal account and placing the files under the ./android/app/src/main/res/raw folder (which had to be created).

I'm assuming at this point that they may need to go under either the ./ios/Runner/Assets.xcassets folder OR maybe the ./ios/Runner.xcodeproj/ folder _(since that location is similar to your documentation for PhoneGap/Cordova/Ionic)_ but haven't been able to test yet due to issues with my Apple Developer account being migrated at the moment, so I'm just trying to get all my ducks in a row, so to speak, and figured I'd ask the question before I attempt to figure it out on my own :)

Environment
Flutter v1.12.13+hotfix.9
OneSignal: onesignal_flutter 2.4.1
Steps to Reproduce Issue:
Try to set custom notification sound on iOS.

Most helpful comment

Finally had a chance to look back into this today and figure it out:

You need to use Xcode to open your Flutter project:
open ios/Runner.xcworkspace

And then add the sound files to the "Runner" folder/parent item in the project manager within Xcode by right-clicking on it and selecting Add Files to "Runner" and then click Options and check off Copy items if needed and then navigate to your sound file you want to import and use with OneSignal.

Hope this helps others asking the same question!

>All comments

Finally had a chance to look back into this today and figure it out:

You need to use Xcode to open your Flutter project:
open ios/Runner.xcworkspace

And then add the sound files to the "Runner" folder/parent item in the project manager within Xcode by right-clicking on it and selecting Add Files to "Runner" and then click Options and check off Copy items if needed and then navigate to your sound file you want to import and use with OneSignal.

Hope this helps others asking the same question!

Was this page helpful?
0 / 5 - 0 ratings