Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods --no-integrate command for different targets

As per http://guides.cocoapods.org/terminal/commands.html#pod_install, if you want to integrate libs or external dependency at yourself you can use -no-integrate option.

Basically i have my static library (comms.a) and header (comms.h). My application will import this library for server communication. My application is not using cocoapods to integrate. (Manually linking from xcode).

But my static library is having below structure.

- Comms (main target) [Dependency on AFNetworking using cocoapods]
- CommsTest (test case target) [Dependency on GHUnit using cocoapods]

What should be my podfile so that it will fetch AFNetworking but integration is up to me and fetch GHUnit and integrate to my testcase target.

NOTE: I don't want my static library to integrate in my application using cocoapods.

like image 771
harshit2811 Avatar asked Nov 25 '25 20:11

harshit2811


1 Answers

Please go through the Command Line switches available in CocoaPods: http://guides.cocoapods.org/terminal/commands.html#pod_install

You will find --no-integrate switch to Skip integration of the Pods libraries in the Xcode project(s).

This means that CocoaPod will not generate the xcworkspace file in this case. Also, with this you will manually have to add Pods.xcodeproj file in your main project as child Project.

Once you add Pods.xcodeproj in your main project, you will also have to add reference of the Public headers and Library in your main project.

For more info you can view the previous post: Building a distributable static library that uses cocoapods

like image 182
DShah Avatar answered Nov 28 '25 15:11

DShah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!