A direct answer to your question: YES, you can definitely enable any third-party library if they expose a public API (a set of headers for you). For AFNetworking, they made it so simple by providing a Cocoapods script so your project could reference it.
But keep in mind that when you release your static library with AFNetwork enabled inside, and someday, if your static lib user decides to use AFNetwork in his own code, the Obj-C compiler will complain about duplicate characters, and it wonβt be able to create your project with its own static library.
My advice
My advice: just refer to the link shared by @Amar above. It is very important NOT to include any third-party libraries in your static library if you are hoping to share it with other developers or the community. Always use links for other third-party static libraries instead of including them, for example, use Cocoapods.
chathuram Nov 04 '13 at 16:33 2013-11-04 16:33
source share