Skip to content

Commit 28471dc

Browse files
committed
fix(app, ios): adopt firebase-ios-sdk 11.15.0
- note that there was a restructure of the Analytics pod dependencies, so we need to configure completely different Pods related to IDFA, and on-device conversion measurement See: https://firebase.google.com/support/faq#analytics-odm2-sdk-refactor-ios
1 parent 3d13d38 commit 28471dc

File tree

5 files changed

+189
-210
lines changed

5 files changed

+189
-210
lines changed

docs/analytics/usage/index.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,8 @@ If you need to avoid IDFA usage while still using analytics, then you need `fire
166166
$RNFirebaseAnalyticsWithoutAdIdSupport = true
167167
```
168168

169-
During `pod install`, using that variable installs a new
170-
["Analytics With No Ad Ids"](https://firebase.google.com/support/release-notes/ios#version_7110_-_april_20_2021)
171-
pod the firebase-ios-sdk team has created, and allows both the use of Firebase Analytics in Kids Category apps,
172-
and use of Firebase Analytics without needing the App Tracking Transparency handling (assuming no other parts
169+
During `pod install`, using that variable installs the `FirebaseAnalytics/Core` Pod but not the `FirebaseAnalytics/IdentitySupport` Pod, so you may use Firebase Analytics in Kids Category apps,
170+
or Firebase Analytics without needing the App Tracking Transparency handling (assuming no other parts
173171
of your app handle data in a way that requires ATT)
174172

175173
Note that for obvious reasons, configuring Firebase Analytics for use without IDFA is incompatible with AdMob
@@ -184,7 +182,7 @@ The way to do this using CocoaPods is to add this variable to your `Podfile` so
184182
$RNFirebaseAnalyticsEnableAdSupport = true
185183
```
186184

187-
Note: this is setting will have no effect if you disabled Ad IDs as described above, since this setting is specifically linking in the `AdSupport` framework which requires the Ad IDs.
185+
Note: this setting will have no effect if you disabled Ad IDs as described above, since this setting is specifically linking in the `AdSupport` framework which requires the Ad IDs.
188186

189187
# firebase.json
190188

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,12 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the
335335

336336
```ruby
337337
# Override Firebase SDK Version
338-
$FirebaseSDKVersion = '11.13.0'
338+
$FirebaseSDKVersion = '11.15.0'
339339
```
340340

341341
Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.
342342

343-
Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=11.12.0` (or whatever version you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=11.13.0 yarn expo prebuild --clean`
343+
Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=11.15.0` (or whatever version you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=11.15.0 yarn expo prebuild --clean`
344344

345345
### Android Performance
346346

packages/analytics/RNFBAnalytics.podspec

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ Pod::Spec.new do |s|
4040

4141
# Firebase dependencies
4242
if defined?($RNFirebaseAnalyticsWithoutAdIdSupport) && ($RNFirebaseAnalyticsWithoutAdIdSupport == true)
43-
Pod::UI.puts "#{s.name}: Using Firebase/AnalyticsWithoutAdIdSupport pod in place of default Firebase/Analytics"
44-
s.dependency 'Firebase/AnalyticsWithoutAdIdSupport', firebase_sdk_version
43+
Pod::UI.puts "#{s.name}: Not installing FirebaseAnalytics/IdentitySupport Pod, no IDFA will be collected."
4544
else
4645
if !defined?($RNFirebaseAnalyticsWithoutAdIdSupport)
47-
Pod::UI.puts "#{s.name}: Using default Firebase/Analytics with Ad Ids. May require App Tracking Transparency. Not allowed for Kids apps."
46+
Pod::UI.puts "#{s.name}: Using FirebaseAnalytics/IdentitySupport with Ad Ids. May require App Tracking Transparency. Not allowed for Kids apps."
4847
Pod::UI.puts "#{s.name}: You may set variable `$RNFirebaseAnalyticsWithoutAdIdSupport=true` in Podfile to use analytics without ad ids."
4948
end
50-
s.dependency 'Firebase/Analytics', firebase_sdk_version
49+
s.dependency 'FirebaseAnalytics/IdentitySupport', firebase_sdk_version
5150

5251
# Special pod for on-device conversion
5352
if defined?($RNFirebaseAnalyticsEnableAdSupport) && ($RNFirebaseAnalyticsEnableAdSupport == true)
@@ -58,8 +57,8 @@ Pod::Spec.new do |s|
5857

5958
# Special pod for on-device conversion
6059
if defined?($RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion) && ($RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion == true)
61-
Pod::UI.puts "#{s.name}: GoogleAppMeasurementOnDeviceConversion pod added"
62-
s.dependency 'GoogleAppMeasurementOnDeviceConversion', firebase_sdk_version
60+
Pod::UI.puts "#{s.name}: GoogleAdsOnDeviceConversion pod added"
61+
s.dependency 'GoogleAdsOnDeviceConversion'
6362
end
6463

6564
if defined?($RNFirebaseAsStaticFramework)

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575
"sdkVersions": {
7676
"ios": {
77-
"firebase": "11.13.0",
77+
"firebase": "11.15.0",
7878
"iosTarget": "13.0",
7979
"macosTarget": "10.15",
8080
"tvosTarget": "13.0"

0 commit comments

Comments
 (0)