简体   繁体   中英

Use CocoaPods in a secondary Xcode project

I have an Xcode workspace that has two projects. The main project uses the second project as a static library. The main project is working fine with CocoaPods. In both projects I need to include AFNetworking. How can I set this up correctly?

PS: I am using unit test in the static library project so including AFNetworking headers wont be enough.

Since you are already using cocoapods, I thinks the best way is to become your secondary project a pod itself, a private one if you can not free the code. That way you can define in the podspec all the dependencies you need, like AFNetworking and when you use that in the main project all the dependencies will be managed for you.

Also that way unit testing and reusing should become even easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM