Cordova Plugin Firebase Analytics support consent
google-services.json
inside the www folderadd this line <resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/www/google-services.json" target="app/google-services.json" />
in config.xml
<platform name="android">
...
<resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/www/google-services.json" target="app/google-services.json" />
</platform>
cordova plugin add emi-indo-cordova-plugin-fanalytics
cordova patform add android@11.0.0
cordova prepare
cordova build android
cordova plugin add emi-indo-cordova-plugin-fanalytics
cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable ANDROID_FIREBASE_BOM_VERSION=32.0.0 --variable ANALYTICS_KTX_VERSIONS=21.2.2
cordova plugin rm emi-indo-cordova-plugin-fanalytics
<preference name="ANDROID_FIREBASE_BOM_VERSION" value="32.0.0"/>
<preference name="ANALYTICS_KTX_VERSION" value="21.2.2"/>
<preference name="ANALYTICS_COLLECTION_ENABLED" value="true"/>
<preference name="AUTOMATIC_SCREEN_REPORTING_ENABLED" value="true"/>
<!-- https://developers.google.com/tag-platform/devguides/app-consent?platform=android -->
<preference name="DEFAULT_ALLOW_ANALYTICS_STORAGE" value="true"/>
<preference name="DEFAULT_ALLOW_AD_STORAGE" value="true"/>
<preference name="AndroidXEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesVersion" value="4.3.15"/>
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable ANDROID_FIREBASE_BOM_VERSION=32.0.0
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable ANALYTICS_KTX_VERSION=21.2.2
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable ANALYTICS_COLLECTION_ENABLED=true
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable AUTOMATIC_SCREEN_REPORTING_ENABLED=true
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable DEFAULT_ALLOW_ANALYTICS_STORAGE=true
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable DEFAULT_ALLOW_AD_STORAGE=true
cordova platform add ios
( Don't add plugins )GoogleService-Info.plist
inside the platform/ios folder<resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/GoogleService-Info.plist" />
in config.xml ( like the example below, must be inside a platform block )<platform name="ios">
...
<resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/GoogleService-Info.plist" />
<preference name="deployment-target" value="12.0" />
<preference name="SwiftVersion" value="5.3" />
</platform>
cordova plugin add emi-indo-cordova-plugin-fanalytics
cordova prepare
pod install --repo-update
YourProject.xcworkspace
( Or open YourProject.xcworkspace
file from Xcode )cordova plugin add emi-indo-cordova-plugin-fanalytics
cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable IOS_FIREBASE_POD_VERSION=10.10.0
cordova plugin rm emi-indo-cordova-plugin-fanalytics
<preference name="IOS_FIREBASE_POD_VERSION" value="10.10.0"/>
<preference name="ANALYTICS_COLLECTION_ENABLED" value="true"/>
<preference name="AUTOMATIC_SCREEN_REPORTING_ENABLED" value="true"/>
<!-- https://developers.google.com/tag-platform/devguides/app-consent?platform=ios -->
<preference name="DEFAULT_ALLOW_ANALYTICS_STORAGE" value="true"/>
<preference name="DEFAULT_ALLOW_AD_STORAGE" value="true"/>
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable IOS_FIREBASE_POD_VERSION=10.10.0
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable ANALYTICS_COLLECTION_ENABLED=true
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable AUTOMATIC_SCREEN_REPORTING_ENABLED=true
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable DEFAULT_ALLOW_ANALYTICS_STORAGE=true
cordova plugin add emi-indo-cordova-plugin-fanalytics --variable DEFAULT_ALLOW_AD_STORAGE=true