Question

I've added Kiwi via Cocoapods. This is the content of the podfile

platform :ios, '5.0'

pod 'BlocksKit'
pod 'ViewUtils'
pod 'AwesomeMenu'

target :KiwiUnitTest, :exclusive => true do
      pod 'Kiwi'
end

I can run the app without problems. But if I hit cmd+u to run the test target (KiwiUnitTest) I get some errors. A class (ParticleView) that should be tested uses BlocksKit (included via Cocoapods). So I added ParticleView to the test target (KiwiUnitTest) and the error says "No visible interface for ... declares the selector ... It seems like that the test target don't know anything about the Cocoapods.

I've already added $(inherited) to the FRAMEWORK_SEARCH_PATHS and added $(BUNDLE_LOADER) to the Test Host. Remove :exclusive => true from the podfile did not help

I deleted everything and setup the whole cocoapods and test target from the scratch.

Was it helpful?

Solution

remove the :exclusive and add the same imports from the main target .pch file to the kiwi unit test .pch file solved the problem

platform :ios, '5.0'

pod 'BlocksKit'
pod 'ViewUtils'
pod 'AwesomeMenu'

target :KiwiUnitTest do
      pod 'Kiwi'
end
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top