I'm trying to test my app which uses a cocoapod. The tests won't run without me adding the cocoapod to the test target in the pod file, but when I do that, it produces the following error:
Class ~ is implemented in both ~AppTarget and ~AppTests. One of the two will be used. Which one is undefined.
This error essentially means Xcode doesn't doesn't know which pod to use, the one from the app target or the test target, which makes sense since the pod may be different versions or have different functionality.
I am using Quick and Nimble for testing, so my imports look like the following:
import Quick
import Nimble
import ~AppTarget
There is a related question: "ios-unit-testing-class-is-implemented-in-both", but the answer there doesn't help.
Does someone have a suggestion how to fix this?
Thanks in advance!