FCM custom notification sound for ios cant find sound file with EAS managed build

I have a react native application that I am using EAS managed build to build an ios app. I am not using XCode directly for anything. My IDE is Jetbrains Webstorm. I have FCM Notifications setup in the app and it is working with remote notifications both foreground and background.

I am trying to use a custom notification sound. I have a notification.wav file that is in the root directory of my project. I am putting notification.wav in the APNS payload sound property when sending a notification through FCM, but I am still just getting the default notification sound.

From what I have read, if the device cannot find the filename exactly as specified, it will play the default sound. I have created a development build and examined the .ipa file and the .car file within it and the notification.wav file does not look like it is bundled in with the App. Everywhere I have looked is showing how to bundle the file in using XCode, but Im not using XCode.

How do I bundle a file into an app using EAS managed builds?

app.json

{
  "expo": {
    "name": "memyselfandi Agent",
    "slug": "support-chat-agent-app",
    "version": "1.1.1",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.memyselfandi.support-chat-agent-app",
      "config": {
        "usesNonExemptEncryption": false
      },
      "googleServicesFile": "./GoogleService-Info.plist",
      "infoPlist": {
        "UIBackgroundModes": [
          "fetch",
          "remote-notification"
        ]
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.memyselfandi.supportchatagentapp",
      "googleServicesFile": "./google-services.json"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
      }
    },
    "owner": "memyselfandi",
    "plugins": [
      "@react-native-firebase/app",
      [
        "expo-build-properties",
        {
          "ios": {
            "useFrameworks": "static"
          }
        }
      ],
      [
        "expo-local-authentication",
        {
          "faceIDPermission": "Allow Agent App to use Face ID."
        }
      ],
      "expo-build-properties"
    ]
  }
}

eas.json

{
  "cli": {
    "version": ">= 5.4.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "android": {
        "gradleCommand": ":app:assembleDebug"
      },
      "ios": {
        "buildConfiguration": "Debug"
      }
    },
    "development-simulator": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    },
    "preview": {
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      }
    },
    "production": {
    }
  },
  "submit": {
    "production": {}
  }
}

Leave a Comment