i added Unit test target to existing project, when i @testable import Product_Module_Name in test class i am getting
Missing required module 'Firebase'
i am using firebase pod in the project
tried adding HEADER_SEARCH_PATHS = "${PODS_ROOT}/Firebase/CoreOnly/Sources" in Build Settings and added
target 'TestTargetName' do
inherit! :search_paths
end
in pod file. But still getting error Missing required module 'Firebase'
I don't use CocoaPods but SPM.
For me the issue was with the wrong TEST_HOST value.
After creating a new project in Xcode 14, the default value was set to:
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YourApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/YourApp";
and it caused the final path to have an extra slash - build/Debug-iphoneos/YourApp.app//YourApp
What worked for me is removing /$(BUNDLE_EXECUTABLE_FOLDER_PATH) from the TEST_HOST
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With