title: How to play system sound on iOS without vibration?
body: <p>In the documentation of <a href="http://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/SystemSoundServicesReference/Reference/reference.html" rel="noreferrer">AudioServicesPlayAlertSound</a>, it says I can disable vibration when playing a sound:</p>
  
  <blockquote>
    <p>iPhone—plays the specified sound. If the user has configured the
    Settings application for vibration on ring, also invokes vibration.
    However, <strong>the device does not vibrate if your app’s audio session is
    configured with the AVAudioSessionCategoryPlayAndRecord</strong> or
    AVAudioSessionCategoryRecord audio session category.</p>
  </blockquote>
  
  <p>However, I still feel vibration on my iPhone 4S (iOS 5.1.1) even after setting my category to "play and record". It rings and vibrates at the same time.</p>
  
  <pre><code>#import &lt;AudioToolbox/AudioServices.h&gt;
  #import &lt;AVFoundation/AVAudioSession.h&gt;
  
  NSError* error;
  [[AVAudioSession sharedInstance]
      setCategory:AVAudioSessionCategoryPlayAndRecord
      error:&amp;error];
  if (error == nil) {
      AudioServicesPlayAlertSound(1000);
  }
  </code></pre>
  
  <p>I've also tried <code>AudioServicesPlaySystemSound</code>, but the results are the same. The reason why I want to disable vibration is because I am making an app where the user must place her phone far away and the phone should not topple over due to vibration.</p>