Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
iOSSystemSoundsLibrary
======================
# iOSSystemSoundsLibrary
- List of all system sounds used in iOS
- Run project on your iOS device to test all available system sounds
- iOS Simulator does NOT play system sounds
- [Screenshot](#screenshot)

##How to use in your project:
## How to use in your project:
- add ``AudioToolbox.framework`` to your project
- import ``#import <AudioToolbox/AudioToolbox.h>``

####Play sound using SystemSoundID
#### Play sound using SystemSoundID
```objective-c
AudioServicesPlaySystemSound (1003); // SMSReceived (see SystemSoundID below)
```

####Play sound using file url
#### Play sound using file url
```objective-c
NSURL *fileURL = [NSURL URLWithString:@"/System/Library/Audio/UISounds/ReceivedMessage.caf"]; // see list below
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((__bridge_retained CFURLRef)fileURL,&soundID);
AudioServicesPlaySystemSound(soundID);
```

# Swift version
see https://github.com/klaas/SwiftySystemSounds

List of SystemSoundIDs
-------------------------
<table>
Expand Down