Swift library that provides support for using the iOS System Alert Tones from the Settings app. These are the default tones you can select when recieveing a message, found in: Settings->Notifications->Messages->Sounds.
The library providers a picker UI similar to what is in the Settings app. Alternatively, if you want to use your own UI, you can use just the core functionality to access the alert tones files.
To run the example project, clone the repo, and run pod install
from the Example directory first.
- Requires iOS 11
- Tested on iOS 14 & 15
AlertTones is available through CocoaPods. To install it, simply add the following line to your Podfile. This will include the picker UI by default.
pod 'AlertTones'
If you want only want the core functionality, use the AlertTones/Cores
subspec instead.
The sound files for the simulator are included inside the Xcode.app package. By default the library will try to use /Applications/Xcode.app
.
If you have Xcode named something different or installed to a different location, you can use the Info.plist
to specify the path with a key named "XcodePath"
. Take a look at the usage in the example app.
Duncan Cunningham
AlertTones is available under the MIT license. See the LICENSE file for more info.