views:

129

answers:

2

I've been trying to make the iPhone Vibrate using this code:

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

But is not working, could it be because I am playing sound at the same time as calling this?

A: 

That should work fine. Has vibration been turned off on the device?

Shaggy Frog
Checked settings, it's on. Is there any way to test it to make sure it works??
Joshua
Are you sure the device can vibrate at all? If you turn the sound switch off and on, does it vibrate?
Shaggy Frog
Which sound switch? The vibrate one?
Joshua
Sorry, I mean the mute toggle on the side.
Shaggy Frog
A: 

On all iPhones that I've tested on (original, 3GS, and 4), it should vibrate. On the iPod touch 1st generation, it'll play a beep through the built-in speaker. On the iPod touch 2nd generation, it won't do anything. On the iPad, it won't do anything either. Those are all the devices I've tested on.

lucius