Working With Audio - Playing Sounds in iOS Application

Dheeraj Kumar Gunti

Reading Time : ( words)


Having some kind of effect to the application brings more user friendly. In that one of the item is playing sound. Here is the small snippet to play a sound in iOS Application.

using AudioToolbox;
string NotificationSoundPath = @"/System/Library/Audio/UISounds/New/Fanfare.caf";
SystemSound notificationSound = SystemSound.FromFile (NotificationSoundPath);
notificationSound.AddSystemSoundCompletion (SystemSound.Vibrate.PlaySystemSound);
notificationSound.PlaySystemSound ();