0

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?

SmallChess
  • 7,498
  • 9
  • 52
  • 85

1 Answers1

1

You need to detect the ringer state, right? If that's the case check this question

Community
  • 1
  • 1
andreamazz
  • 4,206
  • 1
  • 18
  • 36