Abdalrahman Shatou
Abdalrahman Shatou

Reputation: 4748

iPhone - Not able to vibrate the iPhone

I am using this

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

Importing that

#import <AudioToolbox/AudioServices.h>

Then an error is what I got!

Undefined symbols for architecture armv7:"_AudioServicesPlaySystemSound

Why is that?

Upvotes: 1

Views: 549

Answers (1)

mttrb
mttrb

Reputation: 8345

You probably haven't added the AudioToolbox.framework to your project.

You can do this in the Build Phases section of your Target configuration. Under Build Phases select Link Binary with Libraries. Make sure AudioToolbox.framework is in the list of frameworks. If it isn't click the + button at the bottom and select AudioToolbox.framework from the list.

Upvotes: 2

Related Questions