I have an iOS component which relies on the Stripe iOS SDK, Project A. I included the Stripe SDK in Project A in Xcode and it compiles fine.
However, I'm building another project in Xcode which relies on this component, Project B. I added Project A to Project B's libraries. Project A relies on project B but does not rely directly on the Stripe SDK.
Now, whenever I try to compile Project B, I get this error:
ld: framework not found Stripe for architecture x86_64
ld: warning: Auto-Linking supplied '/Users/rettig/wip/react-native-facebook-login.2/Stripe.framework/Stripe', framework linker option at /Users/rettig/wip/react-native-facebook-login.2/Stripe.framework/Stripe is not a dylib
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Stripe", referenced from:
objc-class-ref in libRCTFBLogin.a(RCTFBLogin.o)
ld: symbol(s) not found for architecture x86_64
I had to do two things to get this working:
Add "$(SRCROOT)/../.." (since Project B lives two folders deep inside Project A) to "Framework Search Paths" under Build Settings -> "Search Paths" for the Project B target.
Add the Stripe SDK to Project B's frameworks as well. This second step in particular surprised me because Project B does not rely directly upon Stripe.