Skip to content

fw/applib: Provide sdk music volume and sound for iOS find phone app and others#1326

Open
asyba wants to merge 1 commit into
coredevices:mainfrom
asyba:ios_find_phone
Open

fw/applib: Provide sdk music volume and sound for iOS find phone app and others#1326
asyba wants to merge 1 commit into
coredevices:mainfrom
asyba:ios_find_phone

Conversation

@asyba
Copy link
Copy Markdown
Contributor

@asyba asyba commented May 19, 2026

I got tired of forgetting my iPhone in the garage and not being able to find it, so I did some tests to see how to run "Find My Phone" on iOS.

I know there's an app that allows you to do this on Android, but it's missing for iOS since it's more restrictive.
https://apps.repebble.com/find-my-phone_695da4c3fbfdde0009f99799

Research:
According to my research, on iOS we can use AudioServicesPlayAlertSound, AudioServicesPlaySystemSound, AudioServicesPlaySystemSoundWithCompletion, AVSpeechSynthesizer, and AVAudioPlayer.

But playing around with different options, not all of them work well for every test scenario. For example, if the volume is low/mute, it will only vibrate; if it's on silent (physical button), it will only vibrate. So, after experimenting, I concluded that the ones that will always play sound, regardless of whether it's on silent or in focus mode, are AVAudioPlayer and AVSpeechSynthesizer.

Implementations

  • With AVAudioPlayer, we have to use a custom MP3 ringtone. I uploaded a short 3-second example.

  • AVSpeechSynthesizer is useful, for example, for speaking a phrase or word aloud. I believe it's primarily used for accessibility, but it could also be useful for finding the phone or for other functionalities the community might come up with.

  • I set the sound to a 3-part loop. If we make it infinite, it will keep playing continuously, and if we lose connection/context with the watch, we can't stop it. The only option is to manually close the mobile app. We need to be careful about leaving it playing indefinitely.

  • I created a test watch app; here's the code: https://github.com/asyba/PlaySoundMobile obviously, it uses the modifications I made to the SDK in this PR.

  • The mobile PR iOS find phone mobileapp#199 primarily allows calling SMS/alarm sounds, a default ringtone, synthesized voice, and sounds using the system sound ID.

The FW allows to call those sound methods plus expose the volume and get level control, to also allow the watchapps to set the level to max for find my phone feature.

… and others

Signed-off-by: Federico Bechini <federico.bechini@gmail.com>
@asyba asyba force-pushed the ios_find_phone branch from d9f1fd7 to 134e583 Compare May 19, 2026 03:13
@jplexer
Copy link
Copy Markdown
Member

jplexer commented May 19, 2026

I think this should wait until we have a better permission system: otherwise an app could play loud noises without my consent

@asyba
Copy link
Copy Markdown
Contributor Author

asyba commented May 19, 2026

@jplexer like a system where people can allow/denied if the app/face can control volume, take screenshots, play sounds, turn off wifi, etc on the mobile connected?

How long will it take to start that new system? In the next 6 months? sooner?

@jplexer
Copy link
Copy Markdown
Member

jplexer commented May 20, 2026

I cannot give you an estimate really, I think @sjp4 was primarily working on this

@sjp4
Copy link
Copy Markdown
Member

sjp4 commented May 20, 2026

Hopefully in the next month or two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants