Post

Replies

Boosts

Views

Activity

Reply to AlarmKit - Custom Sounds?
I don't think it has to be a .caf file or a specific length. I made my sound in GarageBand and it's about 10 seconds in total, so not hugely long but more than just a simple beep, and I first made the sound quite awhile ago when caf was being promoted by Apple but I think any standard audio type that is compatible with CoreAudio should work. Also, after you add your file make sure its Target Membership includes whatever Target will be calling the audio, that might have an effect. So if you are calling it from your LiveActivity Target, the sound may have to have the LiveActivity target as a Target Membership. I haven't tried that on a sound (mine is just a simple Lock Screen alarm) but I know that has an impact on other media.
Jun ’25
Reply to AlarmKit - Custom Sounds?
What I did to play a custom sound was I just did Add File "Glass Drum.caf" to add it to the Bundle, then in the func where I schedule the alarm in the AlarmConfiguration I add sound: AlertConfiguration.AlertSound.named("Glass Drum.caf") and that works. Also be sure you have imported ActivityKit. My problem is that when I hit the Stop button, the alarm is dismissed, but the sound keeps playing. I also have the problem where if I haven't locked the screen I get the sound but no alarm visual presentation. Any help on those items would be great.
Jun ’25