Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing required module 'Firebase' for Unit test

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'

like image 206
KEERTHI j Avatar asked Jun 08 '26 14:06

KEERTHI j


1 Answers

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

like image 55
Liubo Avatar answered Jun 11 '26 04:06

Liubo