'FirebaseCore/FirebaseCore.h' file not found

问题:如果你的部分库是使用Cocopod来管理的,并且在Podfile 里面使用了 use_frameworks !。而你的 react-native-firebase又是使用manually link 的, 那么就可能出现 'FirebaseCore/FirebaseCore.h' file not found 的错误 (Archive,Release 的时候)。

解决办法:

  1. 使用 :modular_headers => true 替换 use_frameworks !

2.1 解决调试模式下的错误
IMPROVED - iOS use_frameworks! support
Although use_frameworks! was working in the simplest cases, there were still some issues if it was used in a project that had React installed as a Pod rather than as a linked library.

This release adds some additional search paths to better support this use case. You will also need to make the following changes:

Select the RNFirebase.xcodeproj library in the Xcode navigator
Select the Build Phases tab
Under Link Binary With Libraries, add the Pods_{projectName}.framework file
This will ensure that the Pods are built before react-native-firebase and the headers are available for it to build successfully.

2.2
Add the correct archive header path to the Release part of both Framework Search Paths and Header Search Paths in the RNFirebase project build settings. This defaults to "$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/iphoneos" but the location is dependent on your overall project build settings.

Framework Search Paths.png

Header Search Paths.jpg

Reference 1

Reference 2

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容