Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate symbol _OBJC_CLASS_$_CardIOCreditCardInfo #53

Closed
betzerra opened this issue Oct 8, 2014 · 14 comments
Closed

Duplicate symbol _OBJC_CLASS_$_CardIOCreditCardInfo #53

betzerra opened this issue Oct 8, 2014 · 14 comments

Comments

@betzerra
Copy link

betzerra commented Oct 8, 2014

Just got this error after updating from 2.x to 3.3.1
Are you guys using Card.io inside Braintree?

screen shot 2014-10-08 at 11 36 46

@betzerra
Copy link
Author

betzerra commented Oct 8, 2014

Well, yup. It's confirmed:

  • Braintree uses PayPal SDK
  • PayPal SDK uses Card.io SDK

paypal/PayPal-iOS-SDK#73

@sumanthness the PayPal iOS SDK already contains a copy of the card.io SDK, which is why you are seeing duplicate symbols when you add both SDKs to your project. From the card.io SDK, keep the .h header files (so that you can still access the methods of the card.io SDK), but delete the libCardIO.a library file and remove any references to it from your project.

@betzerra
Copy link
Author

betzerra commented Oct 8, 2014

What I need to know is what PayPal SDK are you using on Braintree 3.3.1, so I can ask PayPal what Card.io version are they using 😓

@burnto
Copy link
Contributor

burnto commented Oct 8, 2014

Hi @betzerra - yep, that's the issue.

The workaround is simply to remove card.io, then add the right version of the card.io headers to your project.

It looks like Braintree iOS 3.3.1 uses a version of the PayPal iOS library that uses card.io 3.8.2. So grabbing these header files and adding them to your project should do the trick.

If you're currently pulling in card.io as a Pod, you'll also need to change your import from #import <CardIO/CardIO.h> to use quotes, e.g. #import "CardIO.h" or #import "CardIO/CardIO.h" (depending on your header search paths).

An upcoming version of the Braintree iOS SDK will include the proper card.io headers, which will make this issue much easier to deal with.

/cc @dgoldman-ebay @romk1n from the PayPal iOS SDK team

Let us know if the fix above works for now. We'll leave this issue open for a bit.

@betzerra
Copy link
Author

betzerra commented Oct 9, 2014

@burnto thanks a lot. It seems to work perfectly.
I'm wondering if there's another scalable way to manage that on the PayPal and Braintree side. Otherwise I'll have to ask what Card.io version are they using everytime Braintree releases a version :-)

@mickeyreiss
Copy link
Contributor

+1. Stay tuned! 🎶

@burnto
Copy link
Contributor

burnto commented Oct 9, 2014

@betzerra we'll include the correct card.io headers in upcoming versions of the Braintree SDK. And we have some other plans for simplification that will also help with this issue.

@ebfikus
Copy link

ebfikus commented Oct 23, 2014

Any updates on this? We're seeing a similar issue with OnePasswordExtension symbols.

@dgoldman-pdx
Copy link

@ebfikus thanks for pointing out the 1Password name conflict. We'll address that very soon!

@srinivasgs
Copy link

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

I am getting this error, any suggestions ?

@mickeyreiss
Copy link
Contributor

@srinivasgs I don't think this is the same issue as the one above. Can you create a new issue?

(To be sure, it sounds like an integration issue. To debug, we'll need more info, like the Braintree-iOS version, whether or not you are using Cocoapods, etc.)

@Femina
Copy link

Femina commented Mar 31, 2015

I am using Braintree 3.7.0 ... Also , I have #import "CardIO.h" in my viewcontroller. I am getting conflict ... I didn't use separate pod for CardIO as it included already! How do I need to use or import cardIO ? I am getting file not found!

@mickeyreiss
Copy link
Contributor

@Femina Card.io is no longer included in Braintree iOS as of 3.7.0. Please add pod "CardIO" to your Podfile.

@Femina
Copy link

Femina commented Mar 31, 2015

@mickeyreiss Yeah Mickey! I tried pod "CardIO". But keep on getting this issue: http://stackoverflow.com/questions/26794422/need-help-in-xcode-library-not-found-lpods-bolts-exit-code-1. Now I just added SDK instead of CardIO pod and proceeded. It worked! Any clue ?

@mickeyreiss
Copy link
Contributor

It could be a number of things. I would need to see the error as well as your Podfile, Podfile.lock and project.pbxproj to know for sure.

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

No branches or pull requests

7 participants