Manually integrate Analytics into your iOS application.
The following steps are only required if you are using React Native <= 0.59 or need to manually integrate the library.
RNFBAnalytics Pod to your projects
target 'app' do # ... pod 'RNFBAnalytics', :path => '../node_modules/@react-native-firebase/analytics' end
You may need to update your local Pods in order for the
RNFBAnalytics Pod to be installed in your project:
$ cd ios/ $ pod install --repo-update
Once the Pods have installed locally, rebuild your iOS project:
npx react-native run-ios
If you would like to enable Firebase Analytics to generate automatic audience metrics for iOS (as it does by default in Android), you must link additional iOS libraries, as documented by the Google Firebase team. Specifically you need
The way to do this using CocoaPods is to add this to your
Podfile (though please use the most current Pod version supported by React Native Firebase):
# ... target 'app' do # ... pod 'RNFBAnalytics', :path => '../node_modules/@react-native-firebase/analytics' pod 'GoogleIDFASupport', '~> 3.14.0' end