has Iphone built in beep sound effect

Csabi picture Csabi · May 3, 2011 · Viewed 17.9k times · Source

hi i need to use beep on iphone, but the only thing i have found is this

NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"alert" ofType:@"wav"];

    SystemSoundID soundID;

    AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath: soundPath], &soundID);

    AudioServicesPlaySystemSound (soundID);

    [soundPath release]; 

it is working and good code but i need to import the alert.wav file.But i rather do this with native (built in) sounds if there exist.

thanks for all the answers cs.

Answer

Diego Torres picture Diego Torres · May 4, 2011

Reading the documentation of Apple and this, I'm almost certain that you can play that wanted sound without carrying it.

You can do this:

AudioServicesPlaySystemSound(1005);

that should do.

Reference: here