I am using the below code in my app to make a beep sound. Its working in my system iPad simulator (both 4.2 and 4.3). But it not making a beep sound in my iPad iOs 4.2.
my code is:
NSURL *tapSound = [[NSBundle mainBundle] URLForResource:@"BEEPJAZZ" withExtension: @"WAV"];
self.soundFileURLRef = (CFURLRef) [tapSound retain];
AudioServicesCreateSystemSoundID (soundFileURLRef,&soundFileObject);
AudioServicesPlayAlertSound (soundFileObject);
There is nothing wrong in your code. Still try to use following code. From one of my working project.
Hope it works.