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.
Sound Notifications Random beeping is usually because of notifications you've requested. Because every app can notify you visually and audibly, and in a number of ways that you control separately, notifications can be confusing.
This beeping mute/unmute sound effect started playing after users updated their iPhone to iOS 15 or later. This is a feature of iOS 15 and later on iPhone. While the beeping sound effect on mute and unmute annoys some users, it's not a bug, it is a feature in iOS 15 for iPhone.
First introduced as part of 2020's iOS 14 update, Sound Recognition is able to, well, recognise sounds. With the feature enabled, your iPhone can detect sounds such as a crying baby, doorbell, or siren, and notify you when it recognises these sounds.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With