Conflict between SDK and IOS IOS SDK for IOS SDK for Braintree: duplicate symbols for armv7 architecture

In an app I am developing (with Xcode 6.1, for iOS 7 and 8), I am using Card IO to grab credit card information and use Braintree as my payment method. Problems occur when I include the Card IO IOS SDK along with the Braintree iOS SDK which was imported by Cocoapods, I got the error:

duplicate symbol _OBJC_CLASS _ $ _ CardIOCreditCardInfo in: /MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) /MyApp/CardIO/libCard7.a(libCardIO/libCard7a- -master.o) duplicate symbol _OBJC_CLASS _ $ _ CardIOPaymentViewController in: /MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) /MyApp/CardIOa/libC libCardIO.a-armv7-master.o) duplicate symbol _OBJC_CLASS _ $ _ CardIOView in: /MyApp/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) / MyAppard / CardIO / libCardIO .a (libCardIO.a-armv7-master.o) duplicate _OBJC_METACLASS _ $ _ CardIOCreditCardInfo in: /MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armov7-m MyApp / CardIO / libCardIO.a (libCardIO.a-armv7-master.o) duplicate symbol _OBJC_METACLASS _ $ _ CardIOPaymentViewController in: /MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) /MyApp/CardIO.a.libCIO( -armv7-master.o) duplicate _OBJC_METACLASS _ $ _ CardIOView symbol in: /MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) / MyAppard / CardIO / libCIO a (libCardIO.a-armv7-master.o) ld: 6 duplicate characters for armv7 clang architecture: error: linker command failed with exit code 1 (use -v to invoke the call)/MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) /MyApp/CardIO/libCardIO.a(libCardIO.a-armv7-master.o) ld: 6 duplicates symbols for armv7 clang architecture: error: linker command failed with exit code 1 (use -v to invoke the call)/MyApp/Pods/Braintree/Braintree/PayPal/mSDK/libPayPalMobile.a(libCardIO.a-armv7-master.o) /MyApp/CardIO/libCardIO.a(libCardIO.a-armv7-master.o) ld: 6 duplicates symbols for armv7 clang architecture: error: linker command failed with exit code 1 (use -v to invoke the call)

It turns out that Braintree includes the Paypay SDK which already contains the CardIO library.

I tried 1) delete (remove link) libCardIO.a in CardIO folder, APP can be built and run, but CardIO view controller and camera cannot be opened properly.
2) delete (remove link) Paypal folder from Braintree, get below error.

Undefined symbols for armv7 architecture:
"_OBJC_CLASS _ $ _ BTPayPalButton" referenced by: objc-class-ref in libPods-Vinyo-2-Braintree.a (Braintree.o) "_OBJC_CLASS _ $ _ BTPayPalViewController" referenced: objc-class-ref in libPods-Vinyo-2-Braintree.a (BTPaymentProvider.o)
"_OBJC_CLASS _ $ _ BTPayPalAppSwitchHandler" referenced by: objc-class-ref in libPods-Vinyo-2-Braintree.a (BTPaymentProvider. o) objc-class-ref in libPods-Vinyo-2-Braintree.a (Braintree.o) ld: symbol not found for armv7 architecture clang: error: linker command with exit code 1 (use -v to invoke the call)

Looking for a solid and reliable way to properly integrate these two SDKs and make it work. Any ideas are appreciated! Thank you in advance!

+3


source to share


1 answer


Dave from card.io is here.

Your first approach is correct. From the information you have provided so far, I'm not sure why this didn't work for you.



See https://github.com/braintree/braintree_ios/issues/53#issuecomment-58379403 for some specific advice.

(In another week or two, this should get easier as the correct card.io headers will be included in the Braintree iOS SDK.)

+3


source







All Articles