I am trying to write some iOS logic tests against classes in my project that use functionality from some of the libraries in my podspec. I am using the standard unit test bu
I added :exclusive => true to avoid duplicated symbol errors in the application test target.
target 'myProjectTests', :exclusive => true do
pod 'OCMock', :head
pod 'XCTAsyncTestCase', :git => 'https://github.com/iheartradio/xctest-additions.git'
end
link_with 'myProject', 'myProjectTests'
When I changed the application test target to the logic unit test one, the linker error occurs.
After I remove :exclusive => true, everything works again.
target 'myProjectTests', do
pod 'OCMock', :head
pod 'XCTAsyncTestCase', :git => 'https://github.com/iheartradio/xctest-additions.git'
end
link_with 'myProject', 'myProjectTests'
:exclusive => true states that everything outside do...end should NOT be linked to myProjectTests, which is reasonable in application test targets, but it will cause linker errors in logic test targets.