React Native Firebase 오류 The Swift pod FirebaseFirestore depends upon FirebaseCoreExtension and FirebaseFirestoreInternal

2024-01-06

아마도 Firestore를 이용하던 중에 ios쪽에서 생긴 문제였던 것 같습니다. 해당 문제를 해결하기 위해서 열심히 구글링 해보았고 firebase를 ios에 적용하면서 맞닦들인 문제들이라는 포스트를 보게 되었습니다.

해당 포스트 확인하기 : firebase를 iOS에 적용하면서 맞닦들인 문제들

해당 포스트에는

The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules.
To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

와 같은 문제가 발생하였고

podfile에 use_native_modules! 아래에

pod 'GoogleUtilities', :modular_headers => true

적은  pod install 다시 하시면 됩니다.

로 해결하였다고 하였습니다.

저 또한 해당 문제도 겪었었지만 이제는 GoogleUtilities가 아닌 FirebaseCoreExtension 와 FirebaseFirestoreInternal에 대한 문제였기에 다시 검색해보았지만 벨로그, 스택오버플로우 등 어디에서도 답을 찾을 수 없었습니다.

하지만 우연히 react-native-firebase github Issues에서 해당 문제를 똑같이 겪고있는 사용자의 사례를 볼 수 있었습니다.

깃허브 이슈 확인하기 : [🐛] ld: framework now found FirebaseFirestoreInternal

해결 방법은 다음과 같이 Podfile을 변경하면 됐습니다.

PodfileCodePodfileCode

실제로 해당 코드로 변경한 결과 Firestore가 ios에서 잘 동작하는 것을 확인할 수 있었습니다!

링크가 복사되었습니다.