react-native-mixpanel icon indicating copy to clipboard operation
react-native-mixpanel copied to clipboard

Can't Manually Add Mixpanel to React Native iOS App

Open sushi-girl opened this issue 6 years ago • 6 comments

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?

sushi-girl avatar Nov 28 '17 06:11 sushi-girl

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 avatar Dec 19 '17 22:12 shemdani

@shemdani I don't see a Mixpanel.Framework anywhere in Mixpanel's files. Where did you find it?

cameronsutter avatar Jan 10 '18 20:01 cameronsutter

@cameronsutter did you follow the instruction here?

MattyK14 avatar Feb 15 '18 17:02 MattyK14

@MattyK14 yup

cameronsutter avatar Feb 20 '18 16:02 cameronsutter

I've run into this a couple times and always come back to this thread. The solution from @MattyK14 does the trick.

jimcamut avatar Jan 09 '19 22:01 jimcamut

I run into the same problem with cocoapods, didn't find a solution

DataGreed avatar Jun 20 '19 17:06 DataGreed