Wednesday, January 31, 2018

Projects dependencies for custom configuration

Leave a Comment

We are using cocoapods to link different projects together. We have a main project with a target (project1) that has 3 configurations release, debug and a custom duplicate of release, qa.

We have 3 external libraries that project1 depends on that are not cocoapod compatible, let's call those external1, external2 and external3. Those external projects only have 2 configurations, the default release and debug.

Our Podfile looks like this:

platform :ios, '8.0' workspace 'project1.xcworkspace'  pod ... pod ...  target 'project1' target 'project1-cal'  target 'external1' do   project '[...]/external1.xcodeproj', 'qa' => :release end  target 'external2' do   project '[...]/external2.xcodeproj', 'qa' => :release end  target 'external3' do   project '[...]/external3.xcodeproj', 'qa' => :release end 

this setup fails when I try to build for Qa with the following error: Showing All Messages error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-external1

The only way I can fix this is by manually adding qa configurations to external1, external2 and external3.

Can someone please help with this, by explaining what I am doing wrong? I lack some depth knowledge of how exactly cocoapod work.

N.B: Pods-external*.qa.xcconfig are being properly created by pod install in Target Support Files/Pods-external1 albeit they aren't appearing in xcode and also no qa configuration are being added.

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment