2

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.

harshit2811
  • 827
  • 1
  • 7
  • 21

1 Answers1

5

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

Community
  • 1
  • 1
DShah
  • 9,768
  • 11
  • 71
  • 127