Source : AudioServices - Wikia for iPhone Developers
AudioService sounds are independent of the device volume controller. Even if the phone is in silent mode, sound signals will play. These sounds can only be muted by tapping Settings → Sounds → Rings and alerts .
Custom system sounds can be played with the following code:
CFBundleRef mainbundle = CFBundleGetMainBundle(); CFURLRef soundFileURLRef = CFBundleCopyResourceURL(mainbundle, CFSTR("tap"), CFSTR("aif"), NULL); AudioServicesCreateSystemSoundID(soundFileURLRef, &soundFileObject);
Call vibration in iPhone
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
Reproduction of the built-in sounds of the system.
AudioServicesPlaySystemSound(1100);
iGo
source share