THIS IS ELLIE

Missing required module 'Firebase' 에러 해결 본문

낑낑/Troubleshooting

Missing required module 'Firebase' 에러 해결

Ellie Kim 2019. 7. 21. 00:59

Unit Test를 하기 위해 파일을 추가해 유닛 테스트를 하려고 했다.

프로젝트에 파이어베이스 관련 라이브러리를 사용하기 있었기 때문에 

Podfile에 Firebase/Core, Firebase/Database이 추가되어있었다.

 

XCTest모듈이 import되어있고 XCTestCase를 상속받은 클래스 파일에
@testable import Only5라고 추가하려 했으나 에러가 발생했다.

(Only5는 프로젝트 이름)

 

그런데 에러가 발생했다.

Missing required module 'Firebase'

에러 메시지 내용은 'Firebase'모듈이 누락되었다고 적혀있었다.

이거 때문에 빌드도 안되는데 이럴 때는 Podfile에 search_paths를 추가해주면된다.

 

나는 Podfile에 아래 코드를 추가해주면 된다.

   target 'Only5Tests' do
     inherit! :search_paths
     # Pods for testing
     pod 'Firebase/Core'
     pod 'Firebase/Database'
     end 

Podfile에 여기까지 작성해주고 

다시 Podfile을 install 시키고 빌드하면 

 

뚜둥

빌드 성공'

 

참고 : search_paths를 inherit 하는 syntax

https://guides.cocoapods.org/syntax/podfile.html#inherit_bang

 

CocoaPods Guides

CocoaPods is fully open-sourced, so it depends on community contributions to get better. If you're looking to start working on CocoaPods, this is the place to start.

guides.cocoapods.org

 

반응형