I have the following code to vibrate
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
It vibrate even the silent switch is on. However, I don't want it to vibrate in silent mode. It's annoying. How do I achieve it?
You need to detect the ringer state, right? If that's the case check this question