1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Make iPhone vibrate

Discussion in 'iPhone/iPad Programming' started by justinm, Nov 28, 2008.

  1. macrumors member

    Hey Everyone-

    Trying to make my first iPhone app here. Need some basic help.

    I am trying to make a very simple app just for myself that has a simple interface. There is one button, which is supposed to make the phone vibrate. I read on the iPhone Dev Center that I need to make a Audioservices.h file which I did. I am having a hard time understanding where to put the code. Here is where I saw the info. http://developer.apple.com/iphone/library/codinghowtos/AudioAndVideo/index.html#PLAYBACK-TRIGGER_VIBRATION_IN_IPHONE

    If you need any files from me, just let me know.
  2. macrumors newbie

    i think that there is sample code is available in iphone dev center and it name is SysSound........
  3. macrumors newbie


    Hey Justin, you're not the only one wondering this, someone was asking the exact same thing at a conference I was at the other day. My understanding is that you can prompt the iPhone to make the standard vibration by calling AudioServicesPlayAlertSound with the correct constant.

    If you check your iPhone docs for that entry it should have the constant. As for custom vibrations, as far as I know it is not exposed.
  4. macrumors newbie

    Try the link Below,

Share This Page