Fynnwind
Fynnwind

Reputation: 31

List of default SystemSoundID

I'm trying to implement AudioServicesPlaySystemSound(SystemSoundID(****)) therefor I need a list of existing IDs for Apples SystemSounds. Searching through various posts I found this on GitHub. I couldn't find a fitting sound in this list for my purpose. Since this repository wasn't updated since 2013 I'm not sure if its up to date. I would like to know if there is a list of SystemSounds which is more up to date.

Upvotes: 1

Views: 4452

Answers (1)

OOPer
OOPer

Reputation: 47876

First of all, the list you have found is not published by Apple. I do not know if the author researched by themself or just collected them, but that sort of action is considered as a reverse engineering which is inhibited in developer agreement.

I couldn't find a fitting sound in this list for my purpose.

You may need to find a sound resource instead of SystemSoundID, and register it and create a SystemSoundID for it using AudioServicesCreateSystemSoundID.

I would like to know if there is a list of SystemSounds which is more up to date.

The latest list of public SystemSoundID is here:

Alert Sound Identifiers

Constants

  • kSystemSoundID_Vibrate

    On the iPhone, use this constant with the AudioServicesPlayAlertSound function to invoke a brief vibration. On the iPod touch, does nothing.

  • kSystemSoundID_UserPreferredAlert

    On the desktop, use this constant with the AudioServicesPlayAlertSound function to play the alert specified in the Sound preference pane.

  • kSystemSoundID_FlashScreen

    On the desktop, use this constant with the AudioServicesPlayAlertSound function to display a flash of light on the screen.

  • kUserPreferredAlert

    Deprecated. Use kSystemSoundID_UserPreferredAlert instead.

(Some of them are for macOS only.)


Using other SystemSoundIDs, can be considered as using private API.

Some comments from Apple developers in Apple's devforums:

Does this count as a private API?

It would not be appropriate to use undocumented arbitrary values in APIs, so I would recommend you not do that in your submission.

Haptic feedback for force touch?

For a fixed SystemSoundID value to be considered API, it must have a symbolic constant in the headers. Passing in other fixed values is not OK.

Upvotes: 3

Related Questions