Creates a sound object that represents a custom sound file.
- iOS 10.0+
- macOS 10.14+
- Mac Catalyst 13.0+
The name of the sound file to play. This parameter must not be
A sound object representing the custom sound.
This method searches for sound files in the following locations, in order:
/Library/Soundsdirectory, where <app_container> is the app's container directory.
/Library/Soundsdirectory, where <group_container> is one of the app's shared group container directories. For information about how to configure group containers for your app, see Configure app groups.
The main bundle of the current executable.
The method chooses the first file it finds with the specified name.