I want to implement a feature where a custom notification sound file is downloaded from the server when the app is first launched and stored locally on the device. When a push notification arrives, the stored sound should be played in all app states, including foreground, background, and terminated (killed) state.
Does anyone have an idea on how to implement this in iOS? Specifically, I am looking for guidance on:
1)Downloading and storing the sound file securely on the device.
2)Using the locally stored file for push notification sounds.
3)Ensuring the sound plays correctly in all states, including when the app is not running.