davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
455 stars 195 forks source link

Undefined Symbols #128

Open erikahumada opened 6 years ago

erikahumada commented 6 years ago

Hey @davodesign84 i have this error on iOS

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)
rodrigoelp commented 6 years ago

Hi, has anybody looked into this one? I am having the same issue integrating this library into my project.

rodrigoelp commented 6 years ago

Hi guys, providing a bit more comments here as the ones provided by @erikahumada to @davodesign84

Here is a script I just ran trying to understand the problem in a brand new project:

react-native init mixpanelTest

cd mixpanelTest

yarn add react-native-mixpanel

react-native link react-native-mixpanel

react-native run-ios

The outcome of this is

... build stuff...

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)

** BUILD FAILED **

The following commands produced analyzer issues:
    Analyze Base/RCTModuleMethod.mm
    Analyze Modules/RCTUIManager.m
(2 commands with analyzer issues)

The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/mixpaneltest.app/mixpaneltest normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/mixpaneltest.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/mixpaneltest.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
rodrigoelp commented 6 years ago

Here is the info of my setup:

react-native -v
> react-native-cli: 2.0.1
> react-native: 0.54.3

And my package.json has the following dependencies

"dependencies": {
    "react": "^16.3.0-alpha.1",
    "react-native": "0.54.3",
    "react-native-mixpanel": "^0.0.16"
  },
rodrigoelp commented 6 years ago

Uhms... I think I found the source of my issues... I am missing the installation of the SDK for iOS.

jimcamut commented 6 years ago

@rodrigoelp did you add the SDK manually/with pods/link? I added manually and I'm still getting an undefined symbols error.

DataGreed commented 5 years ago

I added with pods and still get the same error