Skip to content

Commit

Permalink
feat: Disable analytics
Browse files Browse the repository at this point in the history
Avoid metrics collection by default as this lacks consent required by
the GDPR in Europe. It most likely violates Californian privacy laws as
well. Additionally, metrics collection on dependencies might expose
sensitive information in proprietary projects. Finally, those additional
network requests have an impact on overall build-time, especially for
CocoaPods.

Resolves #5191
  • Loading branch information
saschpe committed Nov 3, 2021
1 parent cb7eacd commit bfd3732
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions android-template/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: "true"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
Expand Down
1 change: 1 addition & 0 deletions android/capacitor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ android {
versionName "1.0"
consumerProguardFiles 'proguard-rules.pro'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: "true"
}
buildTypes {
release {
Expand Down
3 changes: 3 additions & 0 deletions ios-template/App/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
platform :ios, '12.0'
use_frameworks!

# CocoaPods analytics sends network stats synchronously affecting build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
Expand Down

0 comments on commit bfd3732

Please sign in to comment.