I'm making an app which vibrates once a timer reaches a certain limit.
However, when calling
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
Xcode comes up with two errors:
Undefined symbols for architecture i386:
"_AudioServicesPlaySystemSound", referenced from:
-[drawGraph drawRect:] in drawGraph.o
ld: symbol(s) not found for architecture i386
and
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas on what is causing these errors?
If you simply must not add the header files only, as shown above, a framework must be added to your project. and you should a following header. #import <AudioToolbox/AudioToolbox.h>
In Xcode, click your project file at the top of the Project Navigator.
Click 'YourProjectName' under "Targets"
Click the "Build Phases" tab.
Click the plus in the "Link Binary With Libraries" window.
Add the AudioToolbox.Framework library
Add
#import <AudioToolbox/AudioToolbox.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With