user1960169 user1960169 - 1 year ago 143
iOS Question

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_CMMotionManager", referenced from: objc-class-ref in GooglePlus(GPPSpamSignal.o)

Hello I have a project that some one has developed. It has G+, FB integration. When I get the project and try to run it, it gives me this error. How I can solve this? Please help me.

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CMMotionManager", referenced from:
objc-class-ref in GooglePlus(GPPSpamSignal.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Thanks

Answer Source

Undefined symbols means usually that you are missing an import statement. Looks like you are using CMMotionManager is part of CoreMotion, so you might need to :

#import <CoreMotion/CoreMotion.h>

And verify that you have added CoreMotion to your project