-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
[REQUIRED] Step 1: Describe your environment
- Xcode version: Version 11.5 (11E608c)
- Firebase SDK version: 6.26.0
- Firebase Component: Analytics or Core
- Component version: 6.26.0
- Installation method: CocoaPods
[REQUIRED] Step 2: Describe the problem
In our app we want to dynamically turn on/off Firebase Analytics.
Some of our clients don't want any information to be sent to third-parties.
Some clients are ok with that. And we want to keep Firebase Analytics enabled for those.
We tried to implement such cut-off disabling functionality. But in our tests, if you first configure FIRApp+enable analytics and then disable+delete the FIRApp, some information is still sent to firebaselogging-pa.googleapis.com/app-measurement.com.
Is that a bug? Is there more reliable way to dynamically enable/disable Firebase/Analytics?
Thank you!
Steps to reproduce:
- Enable Analytics and configure the app
Analytics.setAnalyticsCollectionEnabled(true)
FirebaseApp.configure()
FirebaseApp.app()?.isDataCollectionDefaultEnabled = true
- Disable analytics and delete the app
Analytics.resetAnalyticsData()
Analytics.setAnalyticsCollectionEnabled(false)
FirebaseApp.app()?.isDataCollectionDefaultEnabled = false
FirebaseApp.app()?.delete({ (success) in })
- Go to home screen.
- In network traffic I see requests like
GET https://app-measurement.com/config/app/1:<some_id>:ios:<some_id>?platform=ios&app_instance_id=<some_id>&gmp_version=60600 HTTP/2.0
or
POST https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog HTTP/2.0
with a long body.
We also have FirebaseScreenReportingEnabled: NO set in our app's .plist file.