Chaitanya Khurana
Chaitanya Khurana

Reputation: 103

Is AudioServicesPlaySystemSound allowed to use in App Store apps?

The AudioServicesPlaySystemSound function comes under System Sound Services. Is this service of AudioToolbox allowed to use?

AudioServicesPlaySystemSound(1012);

Or can it be rejected by Apple when submitting an app using it to the App Store?

Upvotes: 1

Views: 590

Answers (1)

glyvox
glyvox

Reputation: 58069

Yes, it is allowed to use. It's actually documented in Apple Developer Documentation.

There are some limitations on what you can play with this method though:

Sound files that you play using this function must be:

  • No longer than 30 seconds in duration
  • In linear PCM or IMA4 (IMA/ADPCM) format
  • Packaged in a .caf, .aif, or .wav file

If you want level/timing control and the ability of playing multiple sounds at a time, use AVAudioPlayer instead, it's the generally recommended method.

Upvotes: 2

Related Questions