I've seen other answers on how to get the phone to vibrate, but I just can't get this thing to work. Can anyone help me?
My steps:
- Added the AudioToolbox framework (AudioToolbox.framework) to my target in Build Phases.
#import AudioToolbox/AudioServices.h
into myViewController.h
- Added
- (void)vibrate
into myViewController.h
- Added
- (void)vibrate { AudioServicesPlayAlertSound(kSystemSoundID_Vibrate); }
into myViewController.h
under@implementation
- Called
[self vibrate];
in myviewDidLoad
.
What am I missing here?
I don't want to use an IBAction
because this isn't supposed to vibrate off a button being pushed.
Hopefully you can help, and not just share links to other Stack Overflow questions/answers that I guarantee I already checked. I will post any extra code/info necessary.
Thanks!!
I do have my phone on. It is not on silent. And it is an iPhone5.