Cocoapods not binding correctly to 3rd, 4th target (Xcode 7 beta 6)

I have a problem with Cocoapods and Xcode 7 beta 6: I have a project with three different test goals (tests, UITests, IntegrationTests). My pods seem to work just fine with the first goal ("tests"), but other goals have problems:

  • Everything builds perfectly, if I do not refer to any of Cocoapods for the last two purposes.
  • However, when I try to use one of the pods (XCGLogger in this case), I get linker errors.
  • I checked the build phases and found that it was Embed Pods Frameworksmissing for both purposes, so I added it manually.
  • After this and cleaning, deleting the derived data, the problem still exists.

Added screenshot showing linker error. Again, this happens if I try to use XCGLogger for the last two purposes. It works great for the first goal.

Linker error for some purposes

Just to be thorough ... here is the subfile I use:

platform :ios, "8.0"
use_frameworks!

target 'Glimpulse' do
  pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
  pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
  pod 'GRValidation', '~> 0.2'
end

target 'GlimpulseTests' do
  pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
  pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
  pod "Nimble", :git => 'https://github.com/Quick/Nimble.git', :branch => 'swift-2.0'
  pod "Quick", :git => 'https://github.com/zbeckman/Quick.git', :branch => 'swift-2.0'
  pod 'GRValidation', '~> 0.2'
#  pod "SwiftCheck", :git => 'https://github.com/zbeckman/SwiftCheck.git', :branch => 'swift-develop'
end

target 'GlimpulseUITests' do
  pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
  pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
  pod "Nimble", :git => 'https://github.com/Quick/Nimble.git', :branch => 'swift-2.0'
  pod "Quick", :git => 'https://github.com/zbeckman/Quick.git', :branch => 'swift-2.0'
  pod 'GRValidation', '~> 0.2'
#  pod "SwiftCheck", :git => 'https://github.com/zbeckman/SwiftCheck.git', :branch => 'swift-develop'
end

target 'GlimpulseIntegrationTests' do
  pod "SwiftSpinner", :git => 'https://github.com/zbeckman/SwiftSpinner.git'
  pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
  pod "Nimble", :git => 'https://github.com/Quick/Nimble.git', :branch => 'swift-2.0'
  pod "Quick", :git => 'https://github.com/zbeckman/Quick.git', :branch => 'swift-2.0'
  pod 'GRValidation', '~> 0.2'
#  pod "SwiftCheck", :git => 'https://github.com/zbeckman/SwiftCheck.git', :branch => 'swift-develop'
end

link_with 'GlimpulseUITests'
link_with 'GlimpulseIntegrationTests'
+2
source share
3 answers

Yeah. Well, I thought I understood, after a lot of suffering and suffering, deleting, recreating, pod installing and repeating ... and playing with the goals of Xcode. My findings:

Cocoapods 0.38.2 do not like Xcode 7 beta 6 of the new target type "iOS UI Testing Bundle".

pod install. , , Embed pods frameworks . , ( , ), .

... - . , ( ), . : " ": ", . , . ... , ... , , , ​​ Cocoapods.

: @testable. . , Xcode 7...

+1

Podfile:

source 'https://github.com/CocoaPods/Specs.git'

target 'firstTarget', :exclusive => false do
platform :ios, '7.0'
pod 'SwiftSpinner', '~> 0.7'
pod 'XCGLogger', '~> 2.3'
pod 'Nimble', '2.0.0-rc.3'
pod 'Quick', '~> 0.6'
pod 'GRValidation', '~> 0.2'
end

... repeat for every target

pod cocoapods.org.

+1

Cocoapods 0.38.2 xcode 7, . , cocoapods 0,35. gem cocoapods .

0

Source: https://habr.com/ru/post/1620569/


All Articles