ios - Cocoapods with multiple projects and shared libraries -


i have workspace several projects. each customer has own project , each customer's project depends on

  1. core project: static library common code
  2. interface project: static library common interface, i.e. uiviewcontroller code

the interface library depends on core too.

project dependency

each 1 of projects have 2 targets. normal target , tests target, so,

  • core, coretests
  • interface, interfacetests
  • customer, customertests

since every aspect of app being heavily developed @ moment, have projects on same workspace , on same repository because changes may occur in part of structure @ moment.

i want use cocoapods manage dependencies projects have. keep simple let's can use ocmock on every test target, newrelicagent on every normal target , reachability on core target.

the podfile looks this:

workspace 'companyworkspace' xcodeproj 'core/core.xcodeproj' xcodeproj 'interface/interface.xcodeproj' xcodeproj 'customer/customer.xcodeproj'  target :core     platform :ios, '6.0'     xcodeproj 'core/core.xcodeproj'     pod 'newrelicagent', '~> 5.1'     pod 'reachability', '~> 3.2' end  target :coretests     platform :ios, '6.0'     xcodeproj 'core/core.xcodeproj'     pod 'ocmock', '~> 3.1' end   target :interface     platform :ios, '6.0'     xcodeproj 'interface/interface.xcodeproj'     pod 'newrelicagent', '~> 5.1' end  target :interfacetest     platform :ios, '6.0'     xcodeproj 'interface/interface.xcodeproj'     pod 'ocmock', '~> 3.1' end   target :customer     platform :ios, '7.0'     xcodeproj 'customer/customer.xcodeproj'     pod 'newrelicagent', '~> 5.1' end  target :customertests     platform :ios, '7.0'     xcodeproj 'customer/customer.xcodeproj'     pod 'ocmock', '~> 3.1' end 

i solved dependencies between structure adding static library core.a build phases of interface.a , changing user header search paths finds headers. in customer project added core.a , interface.a build phases , modified user header search paths finds code core , interface.

the problem approach core , interface build execute tests when try build customer.app number of duplicate symbols errors. believe because target keyword in cocoapods generates static libraries dependencies configured when customer built tries include twice code core. idea how solve problem?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -