I'm writing an app that using external libraries through CocoaPods such as AFNetworking, ReactiveCocoa etc, and one static library that I wrote before. The static library also contains some external libraries from CocoaPods as well.
I've made my static library an local pod of CocoaPods and imported it as one of my pods.
However, while compiling my new app, error happened.
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_YADAClientManager", referenced from:
objc-class-ref in DZPAppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
YADAClientManager is one class of my static library, and the only code that using it in my new app is in the DZPAppDelegate.m, in application:didFinishLaunchingWithOptions:
[YADAClientManager sharedClientManager];
How to solve this compiling error? And thanks in advance.
Edit:
In the Build Phrase of my app target, the Link Binary With Libraries option, I added the *.a file of my static library, such as libPods-MyApp-MyStaticLibrary.a, the problem above solved but another problem that reported missing AFNetworking and ReactiveCocoa symbols appeared.
After I added the *.a files of those libraries, problem solved.
But I do not think it is an elegant way to solve the problem.