feat(push): bundle a custom notification sound (notif.wav) for chat + calls
Notifications were silent despite the payload requesting sound:'default' and correct device settings. Ship an explicit tone: a generated PCM .wav is bundled into the app (ios-patch.sh copies it in; add-share-extension.rb adds it to the App target's Copy Bundle Resources, tolerantly) and the server now sends sound:'notif.wav'. Part of the consolidated iOS build alongside the background-audio + call-push + AppDelegate fixes. Only affects iOS-native-app tokens (currently just the one test device); web push ignores the field. Needs a fresh Codemagic build for the bundled file to exist. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,14 @@ echo "Entitlements: aps-environment=production ensured in $ENT"
|
||||
# the speaker (headphones/Bluetooth still win when connected). The helper is tolerant and exits 0 even if
|
||||
# the template differs, so it NEVER fails the build. First-pass fix — if WebRTC re-grabs the session
|
||||
# mid-call on device, we follow up with a plugin that re-asserts .overrideOutputAudioPort(.speaker).
|
||||
# ── Bundle the custom notification sound so chat/call pushes have an explicit tone ──────────────────
|
||||
# APNs plays the sound named in the push payload (the server sends sound:'notif.wav'). The file must be a
|
||||
# resource in the app bundle ROOT; copy it in here — add-share-extension.rb then adds it to the App
|
||||
# target's "Copy Bundle Resources". iOS accepts a PCM .wav (<30s) for a notification sound.
|
||||
SND_SRC="mobile/ios-assets/notif.wav"
|
||||
SND_DST="mobile/ios/App/App/notif.wav"
|
||||
if [ -f "$SND_SRC" ]; then cp "$SND_SRC" "$SND_DST" && echo "Copied notification sound -> $SND_DST"; else echo " (notif.wav source missing — sound not bundled)"; fi
|
||||
|
||||
AD="mobile/ios/App/App/AppDelegate.swift"
|
||||
if [ -f "$AD" ]; then
|
||||
echo "Patching AppDelegate audio session"
|
||||
|
||||
Reference in New Issue
Block a user