I\'ve been banging my head against a wall with this for the last few days but despite multiple Google/SO/Github searches I can\'t find a resolution to the issues I\'m having
Adding ${SRCROOT}/Pods/Firebase/CoreOnly/Sources
into the unit test target's "Header search paths" fixed the problem.
Steps:
After this the tests can run and the error will disappear.
Example
A simpler method that also works:
target 'MyApp' do
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
target :MyAppTests
end
I had a similar problem. Phrased in terms of your question, I copied the contents of my MyApp.<configuration>.xcconfig
file to my MyAppTests.<configuration>.xcconfig
file. I cleaned and built the tests, and it worked.
Missing required module Firebase
NO CocoaPods solutionFor those who encounter the same problem but NOT using CocoaPods:
If you're using Firebase, than you have some folder containing Firebase.h
and module.modulemap
file. For example - YOUR_PROJECT_DIR/Linking
If your Main project target is working correct way, than you should go to ProjectSettings -> Targets. Select test target. Search for User headers
and add the path to YOUR_PROJECT_DIR/Linking
. Select recursive
option and you should be good to go.
See the screenshot for more details:
Try changing the inheritance to :complete
, as in:
target 'MyAppTests' do
inherit! :complete
end
Importantly it allows anyone else checking out your repo to just do a pod update
as usual without having to copy .xcconfig
files or other hackery just to build.