Using cocoapods in a subproject

I am trying to organize a project in several modules. For simplicity, I have two modules:

  • iOSAppModule is the top module
    • DataProviderModule - Used by iOSAppModule

So, iOSAppModule is a project that depends on DataProviderModule. Therefore, the DataProviderModule is a subproject of iOSAppModule.

DataProviderModule works independently of iOSAppModule. It has two goals: DataProviderModuleUI and DataProviderModuleStatic. The DataProviderModuleUI is the goal that provides the interface, so external users can test the DataProviderModule. DataProviderModuleStatic is a Cocoa Touch Static Library that removes user interface classes.

Now the problem is this: I use cocoapods in the DataProviderModule, and I cannot use the DataProviderModule (with a static purpose) in iOSAppModule because it cannot find lPods.

Here is my current PodFile in the DataProviderModule:

platform :ios, '5.0'

link_with ['DataProviderModuleUI', 'DataProviderModuleStatic']
pod 'MKNetworkKit', '~> 0.87'

IOSAppModule does not use containers.

+4
source share
2 answers

You can do almost any configuration job if you use the command --no-integrate optionwith the pod command. You need to connect the Pod project to your project manually, but you have much more flexibility.

Pod DataProviderModule , . . .

+1

, , CocoaPods, . CocoaPods, Pods CocoaPods.

CocoaPods, Framework/library . xconfig CocoaPods , .

:

0

All Articles