Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Error IOS: Undefined symbols for architecture x86_64 #73

Closed
geecurve opened this issue Dec 14, 2016 · 4 comments
Closed

Error IOS: Undefined symbols for architecture x86_64 #73

geecurve opened this issue Dec 14, 2016 · 4 comments

Comments

@geecurve
Copy link

geecurve commented Dec 14, 2016

Hi guys I'm getting this on a fresh react native project when i include this component. PS -> I first fixed the duplicate method issue manually from the master by replacing RNMixpanel.m

Full error:
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_Mixpanel", referenced from:
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)

Current react versions:
"react": "15.4.1",
"react-native": "0.39.2",
"react-native-mixpanel": "0.0.11"

Hope you can help.

@geecurve geecurve changed the title Error: Undefined symbols for architecture x86_64 Error IOS: Undefined symbols for architecture x86_64 Dec 14, 2016
@zoontek
Copy link
Contributor

zoontek commented Dec 22, 2016

@geecurve You forgot to install the Mixpanel SDK. This package documentation suggest using Cocoapods for this task, but a much simpler solution can be Carthage
Check the "Adding a framework" section in the Carthage README, add the mixpanel iOS SDK to you project.

@kfiroo
Copy link

kfiroo commented Dec 28, 2016

@zoontek any idea how I can do it without cocoapods?

@zoontek
Copy link
Contributor

zoontek commented Dec 29, 2016

@kfiroo

brew update && brew install carthage
cd ./ios && echo "github "mixpanel/mixpanel-iphone" ~> 3.0.8" > Cartfile
carthage update --platform iOS

and after that: https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos

@nihgwu
Copy link

nihgwu commented Feb 27, 2017

@davodesign84 this kind of issues #41 #6 #3 should not be closed so arbitrarily, there are still a lot of people who don't won't to use the CocoaPods, while the official doc on that missed something and leads us here. I figured out how to fix it after finding this finally http://stackoverflow.com/questions/32363208/symbols-not-found-for-architecture-x86-64-objc-class-mixpanel-referenced

The key point is that simply dragging the Mixpanel folder to your project is not enough, the source files of MixPanel are still not included in Build Phases/Complie Sources, you need to set the options too
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants