react-native-mixpanel
react-native-mixpanel copied to clipboard
Can't Manually Add Mixpanel to React Native iOS App
I am having problems with adding Mixpanel using Cocoapods and Manually. Currently, I'm trying to add it manually and I have been getting the following errors:
I have the following error when I try to build my app on Xcode:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in libRNMixpanel.a(RNMixpanel.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and the same error running on terminal with "react-native run-ios":
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in libRNMixpanel.a(RNMixpanel.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/hypist.app/hypist normal x86_64
(1 failure)
Did anyone have similar errors and have a way to fix it?
Go to your target in XCode, select "Linked Frameworks and Libraries" in "General" tab. Click "+" and add Mixpanel.Framework... It should then work fine.
@shemdani I don't see a Mixpanel.Framework anywhere in Mixpanel's files. Where did you find it?
@cameronsutter did you follow the instruction here?
@MattyK14 yup
I've run into this a couple times and always come back to this thread. The solution from @MattyK14 does the trick.
I run into the same problem with cocoapods, didn't find a solution