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