ios - Vibrate phone when void function called -


i've seen other answers on how phone vibrate, can't thing work. can me?

my steps:

  1. added audiotoolbox framework (audiotoolbox.framework) target in build phases.
  2. #import audiotoolbox/audioservices.h viewcontroller.h
  3. added - (void)vibrate viewcontroller.h
  4. added - (void)vibrate { audioservicesplayalertsound(ksystemsoundid_vibrate); } viewcontroller.h under @implementation
  5. called [self vibrate]; in viewdidload.

what missing here?

i don't want use ibaction because isn't supposed vibrate off button being pushed.

hopefully can help, , not share links other stack overflow questions/answers guarantee checked. post code/info necessary.

thanks!!

i have phone on. not on silent. , iphone5. enter image description here

this should work. vibration disabled in iphone sound settings.

if using ipod touch, should aware device doesn't have vibration motor.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -