GithubHelp home page GithubHelp logo

capacitor-community / firebase-analytics Goto Github PK

View Code? Open in Web Editor NEW
157.0 16.0 63.0 703 KB

Enable Firebase Analytics for Capacitor Apps

License: MIT License

Ruby 3.39% Java 39.88% Objective-C 3.70% Swift 19.63% JavaScript 1.45% TypeScript 31.95%
capacitor firebase analytics plugin

firebase-analytics's Introduction


Firebase Analytics

@capacitor-community/firebase-analytics

Capacitor community plugin for native Firebase Analytics.


✏️✏️ This plugin now supports Capacitor 5 only. For Capacitor 4 please use version 4.x. For Capacitor 3 please use version 1.0.1 ! ✏️✏️

Maintainers

Maintainer GitHub Social
mesur.io mesur-io @mesur_io

Installation

Using npm:

npm install @capacitor-community/firebase-analytics@latest

Using yarn:

yarn add @capacitor-community/firebase-analytics@latest

Sync native files:

# Update the native plugins and dependencies referenced in package.json
npx cap sync

Note: You may also need to run File > Sync Project with Gradle Files in order for Android Studio to recognize the import.

Configuration

No configuration is required for this plugin.

Examples

Click here for an example on how to implement this plugin.

You can also clone the repository:

git clone https://github.com/jcesarmobile/capacitor-firebase-analytics-example

Supported methods

Name Android iOS Web
setUserId
setUserProperty
getAppInstanceId
setScreenName
reset
logEvent
setCollectionEnabled
setSessionTimeoutDuration
enable
disable

Usage

import { FirebaseAnalytics } from "@capacitor-community/firebase-analytics";

/**
 * Platform: Web
 * Configure and initialize the firebase app.
 * @param options - firebase web app configuration options
 * */
FirebaseAnalytics.initializeFirebase({
  apiKey: "...",
  authDomain: "...",
  databaseURL: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "...",
  appId: "...",
  measurementId: "...",
});

/**
 * Platform: Web/Android/iOS
 * Sets the user ID property.
 * @param userId - unique identifier of a user
 * @returns void
 * https://firebase.google.com/docs/analytics/userid
 */
FirebaseAnalytics.setUserId({
  userId: "john_doe_123",
});

/**
 * Platform: Web/Android/iOS
 * Sets a user property to a given value.
 * @param options - property name and value to set
 * @returns void
 * https://firebase.google.com/docs/analytics/user-properties
 */
FirebaseAnalytics.setUserProperty({
  name: "favorite_food",
  value: "pizza",
});

/**
 * Platform: Android/iOS
 * Retrieves the app instance id from the service.
 * @param none
 * @returns instanceId - individual instance id value
 * https://firebase.google.com/docs/analytics/user-properties
 */
FirebaseAnalytics.getAppInstanceId();

/**
 * Platform: Android/iOS
 * Sets the current screen name, which specifies the current visual context in your app.
 * @param screenName - name of the current screen to track
 *        nameOverride - name of the screen class to override
 * @returns instanceId - individual instance id value
 * https://firebase.google.com/docs/analytics/screenviews
 */
FirebaseAnalytics.setScreenName({
  screenName: "login",
  nameOverride: "LoginScreen",
});

/**
 * Platform: Web/Android/iOS
 * Clears all analytics data for this app from the device and resets the app instance id.
 * @param none
 * @returns void
 */
FirebaseAnalytics.reset();

/**
 * Platform: Web/Android/iOS
 * Logs an app event.
 * @param name - name of the event to log
 *        params - key/value pairs of properties (25 maximum per event)
 * @returns void
 */
FirebaseAnalytics.logEvent({
  name: "select_content",
  params: {
    content_type: "image",
    content_id: "P12453",
    items: [{ name: "Kittens" }],
  },
});

/**
 * Platform: Web/Android/iOS
 * Sets whether analytics collection is enabled for this app on this device.
 * @param name - enabled - boolean true/false
 * @returns void
 */
FirebaseAnalytics.setCollectionEnabled({
  enabled: false,
});

/**
 * Platform: Web/Android/iOS
 * Deprecated - use setCollectionEnabled() instead
 * Enable analytics collection for this app on this device.
 * @param none
 * @returns void
 */
FirebaseAnalytics.enable();

/**
 * Platform: Web/Android/iOS
 * Deprecated - use setCollectionEnabled() instead
 * Disable analytics collection for this app on this device.
 * @param none
 * @returns void
 */
FirebaseAnalytics.disable();

/**
 * Platform: Web/Android/iOS
 * Sets the duration of inactivity that terminates the current session.
 * @param duration - duration in seconds (default - 18000)
 * @returns void
 */
FirebaseAnalytics.setSessionTimeoutDuration({
  duration: 10000,
});

Setup

Navigate to the project settings page for your app on Firebase.

iOS

Download the GoogleService-Info.plist file. In Xcode right-click on the yellow folder named "App" and select the Add files to "App".

Tip: if you drag and drop your file to this location, Xcode may not be able to find it.

Android

Download the google-services.json file and copy it to android/app/ directory of your capacitor project.

Variables

This plugin will use the following project variables (defined in your app’s variables.gradle file):

  • $firebaseAnalyticsVersion version of com.google.firebase:firebase-analytics (default: 21.2.2)

iOS setup

  • ionic start my-cap-app --capacitor
  • cd my-cap-app
  • npm install --save @capacitor-community/firebase-analytics
  • mkdir www && touch www/index.html
  • sudo gem install cocoapods (only once)
  • npx cap add ios
  • npx cap sync ios (every time you run npm install)
  • npx cap open ios
  • sign your app at xcode (general tab)
  • add GoogleService-Info.plist to the app folder in xcode

Enable debug view

  1. In Xcode, select Product > Scheme > Edit scheme
  2. Select Run from the left menu
  3. Select the Arguments tab
  4. In the Arguments Passed On Launch section, add -FIRAnalyticsDebugEnabled

Tip: every time you change a native code you may need to clean up the cache (Product > Clean build folder) and then run the app again.

Android setup

  • ionic start my-cap-app --capacitor
  • cd my-cap-app
  • npm install --save @capacitor-community/firebase-analytics
  • mkdir www && touch www/index.html
  • npx cap add android
  • npx cap sync android (every time you run npm install)
  • npx cap open android
  • add google-services.json to your android/app folder

Now you should be set to go. Try to run your client using ionic cap run android --livereload --address=0.0.0.0.

Tip: every time you change a native code you may need to clean up the cache (Build > Clean Project | Build > Rebuild Project) and then run the app again.

Updating

For existing projects you can upgrade all capacitor related packages (including this plugin) with this single command

npx npm-upgrade '*capacitor*' && npm install

Migration

If you were previously using the capacitor-analytics package from npm

  1. Update NPM package:

    npm uninstall --save capacitor-analytics
    npm install --save-prod @capacitor-community/firebase-analytics@latest
  2. Update the plugin initialization in Android's MainActivity.java

    Remove the old plugin import:

    -import io.stewan.capacitor.analytics.AnalyticsPlugin;

    Update the init() call to remove the old plugin import. You may be able to remove the entire init() call if there is nothing else in there.

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
      // Ex: add(TotallyAwesomePlugin.class);
    - add(AnalyticsPlugin.class);
    }});
  3. Public API changes:

    • instance() has been renamed to getAppInstanceId()
    • setScreen() has been renamed to setScreenName()
    • setUserID() has been renamed to setUserId()
    • setUserProp() has been renamed to setUserProperty()
    • enable() has been deprecated in favor of setCollectionEnabled()
    • disable() has been deprecated in favor of setCollectionEnabled()

Further info

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Chris Abernethy

🚧

Priyank Patel

💻

stewwan

💻

Karmjit Singh

⚠️ 🐛

Michel Roca

🐛

Matthias

👀

Tobi

💻

Nicholas Norris

🐛

gabrielscarvalho

🐛 💻

ptmkenny

🐛 💻 📖

vkyeswa

🐛

losciur

⚠️ 🐛

wyattades

💻

losciur

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

firebase-analytics's People

Contributors

allcontributors[bot] avatar brownoxford avatar dependabot[bot] avatar eric-horodyski avatar fohlin avatar hemangsk avatar hoi4 avatar imhoffd avatar ish3lan avatar jcesarmobile avatar mateinenciu avatar mlynch avatar priyankpat avatar ptmkenny avatar qliqdev avatar quqkuk avatar stewones avatar thomasvidas avatar tobium avatar ultimate-tester avatar wyattades avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firebase-analytics's Issues

Update this plugin for Capacitor 3

Capacitor 3 is being built and is already in beta. In this new version the native plugins have been removed from the core and there are some changes that are necessary in the existing plugins.

Example: Plugin Imports
The Plugins object is deprecated, but will continue to work in Capacitor 3. Capacitor plugins should be updated to use the new plugin registration APIs (see the Upgrade Guide for plugins), which will allow them to be imported directly from the plugin’s package.

Going forward, the Plugins object from @capacitor/core should not be used.

// OLD
import { Plugins } from '@capacitor/core';
const { AnyPlugin } = Plugins;
Importing the plugin directly from the plugin’s package is preferred, but the plugin must be updated to work with Capacitor 3 for this to be possible.
// NEW
import { AnyPlugin } from 'any-plugin';

References:

Updating Capacitor to 3.0 in your plugin

Updating Capacitor to 3.0 in your app

Web: Capacitor WebPlugin "FirebaseAnalytics" config object was deprecated in v3 and will be removed in v4.

Describe the bug
As stated in the error message:

Capacitor WebPlugin "FirebaseAnalytics" config object was deprecated in v3 and will be removed in v4.

To Reproduce
Steps to reproduce the behavior:

  1. Install the plugin in a simple Ionic App.
  2. Configure Firebase Analytics for the web according to the README. (Use a FirebaseAnalytics object.):

/**
 * Platform: Web
 * Configure and initialize the firebase app.
 * @param options - firebase web app configuration options
 * */
FirebaseAnalytics.initializeFirebase({
  apiKey: "...",
  authDomain: "...",
  databaseURL: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "...",
  appId: "...",
  measurementId: "...",
});

This results in the following warning in the browser's JS console:

Capacitor WebPlugin "FirebaseAnalytics" config object was deprecated in v3 and will be removed in v4.

The deprecation is in Capacitor v3:


/**
 * Provided for backwards compatibility. Use the registerPlugin() API
 * instead, and provide the web plugin as the "web" implmenetation.
 * For example
 *
 * export const Example = registerPlugin('Example', {
 *   web: () => import('./web').then(m => new m.Example())
 * })
 *
 * @deprecated Deprecated in v3, will be removed from v4.
 */

For example, the Haptics plugin does it like this:


import { registerPlugin } from '@capacitor/core';
const Haptics = registerPlugin('Haptics', {
    web: () => import('./web').then(m => new m.HapticsWeb()),
});
export * from './definitions';
export { Haptics };

capacitor: v 3.0
@capacitor-community/firebase-analytics: 1.0.0-alpha3

Expected behavior
No error occurs. (Update to v4.)

Desktop (please complete the following information):

  • OS: Windows 10: 10.0.19042 Build 19042
  • Browser: Edge 90.0.818.55

Error: Cannot find symbol this.init(savedInstanceState, plugins, null);

I followed Same as the Document, in web everything is fine.
But in Android while Build the project android studios throws this error.

ScreenShot of MainActivity.java
Screenshot 2021-06-03 at 5 04 43 PM

ScreenShot of Error
Screenshot 2021-06-03 at 5 05 30 PM

ScreenShot of Error location at BridgActivity.java
Screenshot 2021-06-03 at 5 05 42 PM

Ionic Info
Screenshot 2021-06-03 at 5 06 18 PM

Screenshot 2021-06-03 at 5 18 50 PM

Please Help me as soon as possible.

Problem with tests

I want to test analytics.
I created my project in Firebase - pl.polskieszlaki.PolskieSzlaki.
I copied google-service.json to android/app folder.
I have connected my smartphone with USB cable and app is working.
Where is my code on a specific page:

console.log('Analytics', FirebaseAnalytics);

    const g = FirebaseAnalytics.getAppInstanceId();
    console.log('ID', g);

    FirebaseAnalytics.setUserId({
      userId: "john_doe_123",
    });

    FirebaseAnalytics.setScreenName({
      screenName: 'login',
      nameOverride: 'LoginScreen',
    });

I have no errors but I also have no live data on google analytics. Am I doing something wrong? How to test if this is working?

FirebaseAnalytics.getAppInstanceId() for android devices does not work

Describe the bug
When using your own example, calling FirebaseAnalytics.getAppInstanceId():
Its returning an string like: 'com.google.android.gms.tasks.zzu@575g1e6'

After checking FirebaseAnalytics class at android folder, I've found the problem:

public void getAppInstanceId(PluginCall call) {
    try {
      if (mFirebaseAnalytics == null) {
        call.error(MISSING_REF_MSSG);
        return;
      }
      String instanceId = mFirebaseAnalytics.getAppInstanceId().toString();  // this line isn't returning the expected value

If you read the documentation of FirebaseAnalytics, you will see that getAppInstanceId will return an Task (what explain the answer I am receiving)

How to solve it
Replace your method for something like:

     @PluginMethod
     public void getAppInstanceId(final PluginCall call) {
           try {
                  if (mFirebaseAnalytics == null) {
                       call.error(MISSING_REF_MSSG);
                       return;
           }
      Task<String> task = this.mFirebaseAnalytics.getAppInstanceId();
      task.addOnSuccessListener(new OnSuccessListener<String>() {
        @Override
        public void onSuccess(String string) {
          JSObject result = new JSObject();
          result.put("instanceId", string);
          call.success(result);
        }
      });
      
    //task.addOnFailureListener(...)
    } catch (Exception ex) {
      call.error(ex.getLocalizedMessage());
    }
  }

Its just required to implement the addOnFailureListener to finish it.

setScreenName:screenClass: must be called from the main thread to ensure that events are associated with the intended screen.

Describe the bug
I have tried to set screen name using setScreenName in Angular 8, but it returns "setScreenName:screenClass: must be called from the main thread to ensure that events are associated with the intended screen."

Expected behavior
I expected setScreenName method change screen name, so Firebase Analytics tracks the name I set.

Screenshots
Xcode console
스크린샷 2020-07-02 20 42 00

Angular 8 source code
스크린샷 2020-07-02 20 42 58
스크린샷 2020-07-02 20 43 42

and package.json

{
  "name": "shaashop-1.1-ionic",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~8.1.2",
    "@angular/common": "~8.1.2",
    "@angular/core": "~8.1.2",
    "@angular/forms": "~8.1.2",
    "@angular/platform-browser": "~8.1.2",
    "@angular/platform-browser-dynamic": "~8.1.2",
    "@angular/router": "~8.1.2",
    "@capacitor-community/firebase-analytics": "^0.1.3",
    "@capacitor/android": "^2.1.0",
    "@capacitor/core": "^2.1.0",
    "@capacitor/ios": "^2.1.0",
    "@ionic-native/core": "^5.0.0",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^4.7.1",
    "@ngx-translate/core": "^12.1.2",
    "@ngx-translate/http-loader": "^5.0.0",
    "cordova-support-android-plugin": "^1.0.2",
    "cordova-support-google-services": "^1.4.1",
    "core-js": "^2.5.4",
    "google-libphonenumber": "^3.2.10",
    "i18n-iso-countries": "^6.0.0",
    "rxjs": "~6.5.1",
    "tslib": "^1.9.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.801.2",
    "@angular-devkit/build-angular": "~0.801.2",
    "@angular-devkit/core": "~8.1.2",
    "@angular-devkit/schematics": "~8.1.2",
    "@angular/cli": "~8.1.2",
    "@angular/compiler": "~8.1.2",
    "@angular/compiler-cli": "~8.1.2",
    "@angular/language-service": "~8.1.2",
    "@capacitor/cli": "2.1.0",
    "@ionic/angular-toolkit": "^2.1.1",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^8.9.5",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.4.3"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {}
  }
}

Additional context
I found "setScreenName:screenClass: must be called after [super viewDidAppear:]." in FIRAnalytics documents

and also found this issue in cordova-firebase-plugin

Thank you!

Error running update: Analyzing dependencies

Describe the bug

I have tried to install v0.2.0, but it caused this issue.

So, I remove that version and reinstall v0.1.3.

but error occur while updating iOS native dependencies.

Below is error message when run ionic cap sync

✔ Updating iOS plugins in 5.20ms
Found 1 Capacitor plugin for ios:
@capacitor-community/firebase-analytics (0.1.3)
✖ Updating iOS native dependencies with "pod install" (may take several minutes):
✖ update ios:
[error] Error running update: Analyzing dependencies
[!] No podspec found for CapacitorCommunityFirebaseAnalytics in ../../node_modules/@capacitor-community/firebase-analytics

setUserID dose not accept numbers

Hello,

the setUserID method does not accept integer as parameter the code give this error

To Native ->    
AnalyticsPlugin   
setUserID   
22003479   
ERROR MESSAGE:    
{"errorMessage":"","message":"missing user id value"}   
⚡️  [error] - ERROR Error: Uncaught (in promise): Object: {"errorMessage":"","message":"missing user id value"}

in my code all my users id are integers so to work around this issue i needed to convert the returned integer into string so setUserID can work without any issue

can this be improved to accept integers and string as will in the feature it will be great

com.google.firebase.iid.zzbg is referenced as an interface from `com.google.firebase.messaging.zzf`

Describe the bug
After migration from capacitor-analytics to capacitor-community/firebase-analytics I got an error during build process in Android Studio:

Task :capacitor-cordova-android-plugins:assembleDebug
Transform artifact firebase-messaging.aar (com.google.firebase:firebase-messaging:20.1.2) with DexingWithClasspathTransform
AGPBI: {"kind":"error","text":"Type com.google.firebase.iid.zzbg is referenced as an interface from com.google.firebase.messaging.zzf.","sources":[{}],"tool":"D8"}
Type com.google.firebase.iid.zzbg is referenced as an interface from com.google.firebase.messaging.zzf.

To Reproduce
Steps to reproduce the behavior:

  1. Migrate from capacitor-firebase to capacitor-community/firebase-analytics
  2. ionic build --prod && npx cap sync
  3. npx cap open android
  4. Build > Clean Project
  5. Build > Rebuild Project

Expected behavior
A successful build :)

Screenshots
Captura de pantalla 2020-07-01 a las 0 01 30

Xcode build error: /myApp/ios/App/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/GDTCCTUploadOperation.m:36:9: 'GoogleUtilities/GULURLSessionDataResponse.h' file not found

Describe the bug
I've been scratching my head over this strange issue I've been having since yesterday in an Ionic Capacitor 2.4.7 project with the following three plugins installed:

"@capacitor-community/admob": "^1.3.4",
"@capacitor-community/firebase-analytics": "^0.3.1",
"@capacitor-community/firebase-crashlytics": "^0.4.0"

I receive the following error in Xcode:
/myApp/ios/App/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/GDTCCTUploadOperation.m:36:9: 'GoogleUtilities/GULURLSessionDataResponse.h' file not found

I also noticed when I run pod install I am getting some weird errors and it seems like some kind of dependency clash between the above 3 plugins (if I remove any of the plugins Xcode will build with no issues and pod install will run with no errors):

Analyzing dependencies
Downloading dependencies
Installing Firebase 3.6.0
Installing Firebase 8.0.0 (was 3.6.0)
Installing GoogleUtilities 1.3.2
Installing GoogleUtilities 7.4.1 (was 1.3.2)
Generating Pods project
Integrating client project
Pod installation complete! There are 5 dependencies from the Podfile and 23 total pods installed.

[!] Unable to read the license file `LICENSE` for the spec `Firebase (8.0.0)`

[!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (7.4.1)`

[!] Unable to read the license file `LICENSE` for the spec `Firebase (8.0.0)`

[!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (7.4.1)`

[!] [Xcodeproj] Generated duplicate UUIDs:

PBXFileReference -- Pods.xcodeproj/mainGroup/children/children:children:|,|,displayName:Firebase,isa:PBXGroup,name:Firebase,path:Firebase,sourceTree:<group>,,children:|,|,displayName:FirebaseAnalytics,isa:PBXGroup,name:FirebaseAnalytics,path:FirebaseAnalytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCore,isa:PBXGroup,name:FirebaseCore,path:FirebaseCore,sourceTree:<group>,,children:|,|,|,|,|,|,|,displayName:FirebaseCoreDiagnostics,isa:PBXGroup,name:FirebaseCoreDiagnostics,path:FirebaseCoreDiagnostics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCrashlytics,isa:PBXGroup,name:FirebaseCrashlytics,path:FirebaseCrashlytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseInstallations,isa:PBXGroup,name:FirebaseInstallations,path:FirebaseInstallations,sourceTree:<group>,,children:|,|,displayName:FirebaseInstanceID,isa:PBXGroup,name:FirebaseInstanceID,path:FirebaseInstanceID,sourceTree:<group>,,children:|,|,displayName:Google-Mobile-Ads-SDK,isa:PBXGroup,name:Google-Mobile-Ads-SDK,path:Google-Mobile-Ads-SDK,sourceTree:<group>,,children:|,|,displayName:GoogleAppMeasurement,isa:PBXGroup,name:GoogleAppMeasurement,path:GoogleAppMeasurement,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:GoogleDataTransport,isa:PBXGroup,name:GoogleDataTransport,path:GoogleDataTransport,sourceTree:<group>,,children:|,|,displayName:GoogleInterchangeUtilities,isa:PBXGroup,name:GoogleInterchangeUtilities,path:GoogleInterchangeUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleSymbolUtilities,isa:PBXGroup,name:GoogleSymbolUtilities,path:GoogleSymbolUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleUserMessagingPlatform,isa:PBXGroup,name:GoogleUserMessagingPlatform,path:GoogleUserMessagingPlatform,sourceTree:<group>,,children:|,|,displayName:GoogleUtilities,isa:PBXGroup,name:GoogleUtilities,path:GoogleUtilities,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:PromisesObjC,isa:PBXGroup,name:PromisesObjC,path:PromisesObjC,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,displayName:nanopb,isa:PBXGroup,name:nanopb,path:nanopb,sourceTree:<group>,,displayName:Pods,isa:PBXGroup,name:Pods,sourceTree:<group>,/Pods/children/children:children:|,displayName:Analytics,isa:PBXGroup,name:Analytics,sourceTree:<group>,,children:|,|,|,|,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/Firebase,sourceTree:<group>,,displayName:Firebase,isa:PBXGroup,name:Firebase,path:Firebase,sourceTree:<group>,/Pods/Firebase/children/children:displayName:Firebase.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.debug.xcconfig,sourceTree:<group>,,displayName:Firebase.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.release.xcconfig,sourceTree:<group>,,displayName:Firebase.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.debug.xcconfig,sourceTree:<group>,,displayName:Firebase.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.release.xcconfig,sourceTree:<group>,,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/Firebase,sourceTree:<group>,/Pods/Firebase/Support Files/children/displayName:Firebase.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.debug.xcconfig,sourceTree:<group>,/Pods/Firebase/Support Files/Firebase.debug.xcconfig
PBXFileReference -- Pods.xcodeproj/mainGroup/children/children:children:|,|,displayName:Firebase,isa:PBXGroup,name:Firebase,path:Firebase,sourceTree:<group>,,children:|,|,displayName:FirebaseAnalytics,isa:PBXGroup,name:FirebaseAnalytics,path:FirebaseAnalytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCore,isa:PBXGroup,name:FirebaseCore,path:FirebaseCore,sourceTree:<group>,,children:|,|,|,|,|,|,|,displayName:FirebaseCoreDiagnostics,isa:PBXGroup,name:FirebaseCoreDiagnostics,path:FirebaseCoreDiagnostics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCrashlytics,isa:PBXGroup,name:FirebaseCrashlytics,path:FirebaseCrashlytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseInstallations,isa:PBXGroup,name:FirebaseInstallations,path:FirebaseInstallations,sourceTree:<group>,,children:|,|,displayName:FirebaseInstanceID,isa:PBXGroup,name:FirebaseInstanceID,path:FirebaseInstanceID,sourceTree:<group>,,children:|,|,displayName:Google-Mobile-Ads-SDK,isa:PBXGroup,name:Google-Mobile-Ads-SDK,path:Google-Mobile-Ads-SDK,sourceTree:<group>,,children:|,|,displayName:GoogleAppMeasurement,isa:PBXGroup,name:GoogleAppMeasurement,path:GoogleAppMeasurement,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:GoogleDataTransport,isa:PBXGroup,name:GoogleDataTransport,path:GoogleDataTransport,sourceTree:<group>,,children:|,|,displayName:GoogleInterchangeUtilities,isa:PBXGroup,name:GoogleInterchangeUtilities,path:GoogleInterchangeUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleSymbolUtilities,isa:PBXGroup,name:GoogleSymbolUtilities,path:GoogleSymbolUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleUserMessagingPlatform,isa:PBXGroup,name:GoogleUserMessagingPlatform,path:GoogleUserMessagingPlatform,sourceTree:<group>,,children:|,|,displayName:GoogleUtilities,isa:PBXGroup,name:GoogleUtilities,path:GoogleUtilities,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:PromisesObjC,isa:PBXGroup,name:PromisesObjC,path:PromisesObjC,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,displayName:nanopb,isa:PBXGroup,name:nanopb,path:nanopb,sourceTree:<group>,,displayName:Pods,isa:PBXGroup,name:Pods,sourceTree:<group>,/Pods/children/children:children:|,displayName:Analytics,isa:PBXGroup,name:Analytics,sourceTree:<group>,,children:|,|,|,|,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/Firebase,sourceTree:<group>,,displayName:Firebase,isa:PBXGroup,name:Firebase,path:Firebase,sourceTree:<group>,/Pods/Firebase/children/children:displayName:Firebase.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.debug.xcconfig,sourceTree:<group>,,displayName:Firebase.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.release.xcconfig,sourceTree:<group>,,displayName:Firebase.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.debug.xcconfig,sourceTree:<group>,,displayName:Firebase.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.release.xcconfig,sourceTree:<group>,,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/Firebase,sourceTree:<group>,/Pods/Firebase/Support Files/children/displayName:Firebase.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:Firebase.release.xcconfig,sourceTree:<group>,/Pods/Firebase/Support Files/Firebase.release.xcconfig
PBXFileReference -- Pods.xcodeproj/mainGroup/children/children:children:|,|,displayName:Firebase,isa:PBXGroup,name:Firebase,path:Firebase,sourceTree:<group>,,children:|,|,displayName:FirebaseAnalytics,isa:PBXGroup,name:FirebaseAnalytics,path:FirebaseAnalytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCore,isa:PBXGroup,name:FirebaseCore,path:FirebaseCore,sourceTree:<group>,,children:|,|,|,|,|,|,|,displayName:FirebaseCoreDiagnostics,isa:PBXGroup,name:FirebaseCoreDiagnostics,path:FirebaseCoreDiagnostics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCrashlytics,isa:PBXGroup,name:FirebaseCrashlytics,path:FirebaseCrashlytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseInstallations,isa:PBXGroup,name:FirebaseInstallations,path:FirebaseInstallations,sourceTree:<group>,,children:|,|,displayName:FirebaseInstanceID,isa:PBXGroup,name:FirebaseInstanceID,path:FirebaseInstanceID,sourceTree:<group>,,children:|,|,displayName:Google-Mobile-Ads-SDK,isa:PBXGroup,name:Google-Mobile-Ads-SDK,path:Google-Mobile-Ads-SDK,sourceTree:<group>,,children:|,|,displayName:GoogleAppMeasurement,isa:PBXGroup,name:GoogleAppMeasurement,path:GoogleAppMeasurement,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:GoogleDataTransport,isa:PBXGroup,name:GoogleDataTransport,path:GoogleDataTransport,sourceTree:<group>,,children:|,|,displayName:GoogleInterchangeUtilities,isa:PBXGroup,name:GoogleInterchangeUtilities,path:GoogleInterchangeUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleSymbolUtilities,isa:PBXGroup,name:GoogleSymbolUtilities,path:GoogleSymbolUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleUserMessagingPlatform,isa:PBXGroup,name:GoogleUserMessagingPlatform,path:GoogleUserMessagingPlatform,sourceTree:<group>,,children:|,|,displayName:GoogleUtilities,isa:PBXGroup,name:GoogleUtilities,path:GoogleUtilities,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:PromisesObjC,isa:PBXGroup,name:PromisesObjC,path:PromisesObjC,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,displayName:nanopb,isa:PBXGroup,name:nanopb,path:nanopb,sourceTree:<group>,,displayName:Pods,isa:PBXGroup,name:Pods,sourceTree:<group>,/Pods/children/children:children:|,displayName:Frameworks,isa:PBXGroup,name:Frameworks,sourceTree:<group>,,children:|,|,|,|,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/GoogleUtilities,sourceTree:<group>,,displayName:GoogleUtilities,isa:PBXGroup,name:GoogleUtilities,path:GoogleUtilities,sourceTree:<group>,/Pods/GoogleUtilities/children/children:displayName:GoogleUtilities.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.debug.xcconfig,sourceTree:<group>,,displayName:GoogleUtilities.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.release.xcconfig,sourceTree:<group>,,displayName:GoogleUtilities.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.debug.xcconfig,sourceTree:<group>,,displayName:GoogleUtilities.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.release.xcconfig,sourceTree:<group>,,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/GoogleUtilities,sourceTree:<group>,/Pods/GoogleUtilities/Support Files/children/displayName:GoogleUtilities.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.debug.xcconfig,sourceTree:<group>,/Pods/GoogleUtilities/Support Files/GoogleUtilities.debug.xcconfig
PBXFileReference -- Pods.xcodeproj/mainGroup/children/children:children:|,|,displayName:Firebase,isa:PBXGroup,name:Firebase,path:Firebase,sourceTree:<group>,,children:|,|,displayName:FirebaseAnalytics,isa:PBXGroup,name:FirebaseAnalytics,path:FirebaseAnalytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCore,isa:PBXGroup,name:FirebaseCore,path:FirebaseCore,sourceTree:<group>,,children:|,|,|,|,|,|,|,displayName:FirebaseCoreDiagnostics,isa:PBXGroup,name:FirebaseCoreDiagnostics,path:FirebaseCoreDiagnostics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseCrashlytics,isa:PBXGroup,name:FirebaseCrashlytics,path:FirebaseCrashlytics,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:FirebaseInstallations,isa:PBXGroup,name:FirebaseInstallations,path:FirebaseInstallations,sourceTree:<group>,,children:|,|,displayName:FirebaseInstanceID,isa:PBXGroup,name:FirebaseInstanceID,path:FirebaseInstanceID,sourceTree:<group>,,children:|,|,displayName:Google-Mobile-Ads-SDK,isa:PBXGroup,name:Google-Mobile-Ads-SDK,path:Google-Mobile-Ads-SDK,sourceTree:<group>,,children:|,|,displayName:GoogleAppMeasurement,isa:PBXGroup,name:GoogleAppMeasurement,path:GoogleAppMeasurement,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:GoogleDataTransport,isa:PBXGroup,name:GoogleDataTransport,path:GoogleDataTransport,sourceTree:<group>,,children:|,|,displayName:GoogleInterchangeUtilities,isa:PBXGroup,name:GoogleInterchangeUtilities,path:GoogleInterchangeUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleSymbolUtilities,isa:PBXGroup,name:GoogleSymbolUtilities,path:GoogleSymbolUtilities,sourceTree:<group>,,children:|,|,displayName:GoogleUserMessagingPlatform,isa:PBXGroup,name:GoogleUserMessagingPlatform,path:GoogleUserMessagingPlatform,sourceTree:<group>,,children:|,|,displayName:GoogleUtilities,isa:PBXGroup,name:GoogleUtilities,path:GoogleUtilities,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,displayName:PromisesObjC,isa:PBXGroup,name:PromisesObjC,path:PromisesObjC,sourceTree:<group>,,children:|,|,|,|,|,|,|,|,|,|,displayName:nanopb,isa:PBXGroup,name:nanopb,path:nanopb,sourceTree:<group>,,displayName:Pods,isa:PBXGroup,name:Pods,sourceTree:<group>,/Pods/children/children:children:|,displayName:Frameworks,isa:PBXGroup,name:Frameworks,sourceTree:<group>,,children:|,|,|,|,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/GoogleUtilities,sourceTree:<group>,,displayName:GoogleUtilities,isa:PBXGroup,name:GoogleUtilities,path:GoogleUtilities,sourceTree:<group>,/Pods/GoogleUtilities/children/children:displayName:GoogleUtilities.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.debug.xcconfig,sourceTree:<group>,,displayName:GoogleUtilities.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.release.xcconfig,sourceTree:<group>,,displayName:GoogleUtilities.debug.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.debug.xcconfig,sourceTree:<group>,,displayName:GoogleUtilities.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.release.xcconfig,sourceTree:<group>,,displayName:Support Files,isa:PBXGroup,name:Support Files,path:../Target Support Files/GoogleUtilities,sourceTree:<group>,/Pods/GoogleUtilities/Support Files/children/displayName:GoogleUtilities.release.xcconfig,includeInIndex:1,isa:PBXFileReference,lastKnownFileType:text.xcconfig,path:GoogleUtilities.release.xcconfig,sourceTree:<group>,/Pods/GoogleUtilities/Support Files/GoogleUtilities.release.xcconfig

[!] [Xcodeproj] Generated duplicate UUIDs:

PBXAggregateTarget -- 072CEA044D2EF26F03496D5996BBF59F
PBXAggregateTarget -- 8D7F5D5DD528D21A72DC87ADA5B12E2D

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

To Reproduce
Steps to reproduce the behavior:

  1. Create a brand new Ionic Capacitor app (version 2.4.7 of capacitor)
  2. Install the 3 plugins listed in the description with npm install
  3. Run npx cap sync
  4. Run npx cap open ios to open in Xcode (12.4) and build and above error will happen
  5. Additionally running pod install in the ios/App directory will produce errors

Expected behavior
Xcode should build with no errors and pod install shouldn't throw warnings.

Screenshots
None

Desktop (please complete the following information):

Ionic:

   Ionic CLI                     : 6.16.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.7
   @angular-devkit/build-angular : 0.1102.12
   @angular-devkit/schematics    : 11.2.6
   @angular/cli                  : 11.2.12
   @ionic/angular-toolkit        : 3.1.1

Capacitor:

   Capacitor CLI      : 2.4.7
   @capacitor/android : 2.4.7
   @capacitor/core    : 2.4.7
   @capacitor/ios     : 2.4.7

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

System:

   NodeJS : v14.17.0 (/usr/local/Cellar/node@14/14.17.0/bin/node)
   npm    : 6.14.13
   OS     : macOS Catalina

Smartphone (please complete the following information):
Xcode 12.4

Additional context
Things I've tried:

  1. Delete node_modules
  2. Delete podfile.lock and Pods folder
  3. pod install --repo-update
  4. Updating coacoapods

Usage with @capacitor-community/fcm causes crash on android

Describe the bug
Hi! Im using this plugin together with @capacitor-community/fcm (both on latest version) and when I run my app on my android device it crashes on startup.

To Reproduce
Steps to reproduce the behavior:

  1. Install both @capacitor-community/fcm and @capacitor-community/firebase-analytics.
  2. Run npx cap sync

In my MainActivity.java file, I have added

import com.getcapacitor.community.fcm.FCMPlugin;
import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
        add(FirebaseAnalytics.class);
        add(FCMPlugin.class);
    }});
  }
}

When I run the app through android studio, it builds successfully but crashes instantly after splashscreen.

Smartphone (please complete the following information):

  • Device: OnePlus 8 Pro
  • OS: MacOS 10.14.6
  • Android Studio: 3.6.2
  • @capacitor/android: 2.4.0,
  • @capacitor/core: 2.4.0,
  • @capacitor-community/fcm: 1.0.8,
  • @capacitor-community/firebase-analytics: 0.2.0,

Additional context

I have tried reversing the order of the added plugins but to no luck.

On iOS everything works perfectly.

If I comment out the FCMPlugin.class line the app starts.
If I remove the analytics line + import, the app still crashes. I have to remove the plugin completely for the app to work again.

So I can start the app using either of these plugins seperately but not together.

Capacitor 2.0 support

Hi, looks like my project was unable to import the plugin:

Cannot read property 'enable' of undefined

I'm currently using capacitor 2.0beta (because I want to use androidx support). Maybe that's the problem? Thanks in advance.

Issue using xcode iPhone simulator with new M1 chipset

Describe the bug
Attempting to use iPhone simulator using xcode using an M1 Mac Mini gives the following error:
[PROJECTPATH]/ios/App/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_a8eeba373b74508311b8b22b8d3202a6.o), building for iOS Simulator, but linking in object file built for iOS, file '[PROJECTPATH]/ios/App/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture arm64

I have found this - firebase/firebase-ios-sdk#6520 which may be of some help, but I'm not knowledgeable about any ios stuff at all

FirebaseAnalytics.initializeFirebase is not a function on a vanilla angular project

Describe the bug

Starting an angular vanilla project with firebase-analytics throws a initializeFirebase is not a function error. Note that Firebase itself does work (the default events), as can be seen on the xcode console and on firebase analytics debug steam.

To Reproduce

  1. run the following script
project_name="ABC"
project_id="com.company.abc"
ionic start "$project_name" "sidemenu" --type="angular" --project-id="$project_id" --package-id="$project_id" --capacitor --no-interactive
cd "$project_id"
yarn add "@capacitor-community/firebase-analytics"
mkdir www && touch www/index.html
sudo gem install cocoapods
ionic cap add "ios"
ionic cap sync
  1. Add GoogleService-Info.plist via xcode
  2. Add imports and FirebaseAnalytics.initializeFirebase per the code examples with the correct init options taken from GoogleService-Info.plist (btw, why do we need this data duplicity -- it's bug prone).

Bug

The following error appears on xcode console:

[error] - ERROR Error: Uncaught (in promise): TypeError: Z.initializeFirebase is not a function. (In 'Z.initializeFirebase(...)', 'Z.initializeFirebase' is undefined)

Expected behavior

Not to have an error.

Smartphone

  • Device: emulator iphone 8 and real iphone 8.
  • OS: iOS 13.7

Crashes on VueJS implementation

Has anyone had success with VueJS and Capacitor?

I get:

⚡️ [error] - {"line":1,"column":5502,"sourceURL":"capacitor://localhost/js/app.63a4a7d6.js"}

in my iOS Console.

Allways Error: value for items is missing

Hi community.

I'm dealing with this issue, i don't know if i'm doing something wrong, but every time i call logEvent with "items" property i get an error saying "value for items is missing"

this is my implementation

FirebaseAnalytics.logEvent({
      name: "product_click", params: {
        content_type: "page_view",
        item_id: producto.id,
        item_name: producto.nombre,
        comerce_id: producto.comercio,
        source: "selections",
        items: [{
          tipo: "producto",
          nombre: producto.nombre,
          id: producto.id
        }],
      }
    });

i see the error occurs in FirebaseAnalytics.java line 149 since in mi implementation "Item" is not an String, Integer, Doble en so on.

while (keys.hasNext()) {
            String key = keys.next();
            Object value = params.get(key);

            if (value instanceof String) {
              bundle.putString(key, (String) value);
            } else if (value instanceof Integer) {
              bundle.putInt(key, (Integer) value);
            } else if (value instanceof Double) {
              bundle.putDouble(key, (Double) value);
            } else if (value instanceof Long) {
              bundle.putLong(key, (Long) value);
            } else {
              call.reject("value for " + key + " is missing");
            }
          }

I need help, thanks in advance.

Firebase CORS on website

Hello,

I'm using this plugin in my ionic capacitor/angular project, everything is setup properly, the firebase analytics is working on iOS and Android. However I keep getting CORS error in my website (screenshot below)

image

my code:

constructor(private appInsightsService: AppInsightsService, private fb: Facebook, private router: Router) {
    this.initFb();
    this.router.events.pipe(filter((e: RouterEvent) => e instanceof NavigationEnd)).subscribe((e: RouterEvent) => {
      this.setScreenName(e.url);
    });
  }

async initFb() {
    if (environment.production) {
      if ((await Device.getInfo()).platform == 'web') {
        FirebaseAnalytics.initializeFirebase(environment.firebaseConfig);
      }
    }
  }

logEvent(name: string) {
    FirebaseAnalytics.logEvent({
      name,
    });
  }

setScreenName(screenName) {
    if (environment.production) {
      FirebaseAnalytics.setScreenName({
        screenName,
      });
    }
  }

Any ideas what i'm missing?

Add web support

Is your feature request related to a problem? Please describe.
Firebase Analytics web plugin not supported at the moment.

Describe the solution you'd like
Implement Firebase Analytics for web.

Describe alternatives you've considered
N/A

Additional context
N/A

enable(): Promise<void> Isn't a function

I've implemented the plugin as the docs suggest. Each of the methods work as you've said however the enable() method doesn't exist.

When I call this method I get the following error:

ERROR Error: Uncaught (in promise): TypeError: AnalyticsPlugin.enable is not a function
TypeError: AnalyticsPlugin.enable is not a function

My implementation:

import { Analytics } from 'capacitor-analytics';
const analytics = new Analytics();

analytics.enable().then(() => { console.log('analytics.enable')});

Accuracy of Android Data

I'm not sure this is exactly a bug but I've been having trouble getting accurate data into firebase analytics for android. Sometimes its showing that a ton of people are using a version that has only been pushed to our internal testing. And then today when I was using that same version I'm not seeing anything in firebase or google analytics. Am I the only one experiencing this?

[Question] Capacitor vs js

Hi, I am currently new to the ionic/ capacitor framework. Based on my understanding, the capacitor allows the access to the native capabilities, so as a newbie, I have a question:

What is the difference/ benefits using the capacitor vs web way (i.e angularfire in ionic angular) to enable the analytics? Does the capacitor plugin collect more information related to the device itself?

Thank you and looking forward for your response.

class file for androidx.appcompat.app.AppCompatActivity not found

Describe the bug
Android app build fails upgrading to capacitor v3

To Reproduce
Following the upgrade steps here: https://capacitorjs.com/docs/v3/updating/3-0#update-android-variables

I installed the alpha release of this plugin:
package.json: "@capacitor-community/firebase-analytics": "^1.0.0-alpha.0",

I've tried

ext {
    minSdkVersion = 21
    compileSdkVersion = 30
    targetSdkVersion = 30
    androidxAppCompatVersion = '1.1.0'       // TRIED keeping 1.1.0 which was working before and tried the recommended 1.2.0. neither work
    androidxCoreVersion =  '1.3.2'
    androidxMaterialVersion =  '1.1.0-rc02'
    androidxBrowserVersion =  '1.3.0'
    androidxLocalbroadcastmanagerVersion =  '1.0.0'
    firebaseMessagingVersion = '21.0.1'
    playServicesLocationVersion =  '17.1.0'
    junitVersion =  '4.13.1'
    androidxJunitVersion =  '1.1.2'
    androidxEspressoCoreVersion =  '3.3.0'
    cordovaAndroidVersion =  '7.0.0'
}

Android studio output:

.../node_modules/@capacitor-community/firebase-analytics/android/src/main/java/com/getcapacitor/community/firebaseanalytics/FirebaseAnalytics.java:41: error: cannot access AppCompatActivity
        bridge.getActivity()
                          ^
  class file for androidx.appcompat.app.AppCompatActivity not found

(hence why I tried downgrading androidxAppCompatVersion

Expected behavior
Build to succeed

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
macOS running Android studio 4.1.2

Smartphone (please complete the following information):
Pixel 4

Additional context
Add any other context about the problem here.

The default Firebase app has not yet been configured

When I run my app in IOS, I have the following error:

The default Firebase app has not yet been configured. Add [FIRApp configure]; (FirebaseApp.configure() in Swift) to your application initialization.

The plugin.swift code:

    public override func load() {
        if FirebaseApp.app() == nil {
            FirebaseApp.configure()
        }
    }

No data is displayed in DebugView for web

Describe the bug
I tried to implement firebase analytics in my ionic capacitor app.
Its working in iOS without any problem.
But when i debug for web, no data is displayed in DebugView even though i enable chrome extension for debug.
Is it possible to display web analytics data in DebugView?

To Reproduce

  1. Setup firebase analytics in reference to https://devdactic.com/firebase-analytics-ionic/
  2. Run ionic serve
  3. Enable chrome extension - Google Analytics Debugger -
  4. Reload browser

Screenshots
No data is displayed in DebugView in firebase.
スクリーンショット 2021-04-06 23 45 21

Ionic Info:

Ionic:

   Ionic CLI                     : 6.13.1
   Ionic Framework               : @ionic/angular 5.5.3
   @angular-devkit/build-angular : 0.1100.7
   @angular-devkit/schematics    : 11.0.7
   @angular/cli                  : 11.0.7
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 2.4.6
   @capacitor/core : 2.4.6

Utility:

   cordova-res (update available: 0.15.3) : 0.15.2
   native-run (update available: 1.3.0)   : 1.0.0

System:

   NodeJS : v14.4.0
   npm    : 7.7.6
   OS     : macOS Big Sur

Package.json:


 "dependencies": {
    "@angular/common": "~11.0.5",
    "@angular/core": "~11.0.5",
    "@angular/forms": "~11.0.5",
    "@angular/platform-browser": "~11.0.5",
    "@angular/platform-browser-dynamic": "~11.0.5",
    "@angular/router": "~11.0.5",
    "@capacitor-community/camera-preview": "^2.0.0-beta.0",
    "@capacitor-community/firebase-analytics": "^0.2.1",
    "@capacitor/android": "^2.4.6",
    "@capacitor/core": "2.4.6",
    "@capacitor/ios": "^2.4.6",
    "@ionic-native/badge": "^5.31.1",
    "@ionic-native/location-accuracy": "^5.31.1",
    "@ionic-native/open-native-settings": "^5.31.1",
    "@ionic/angular": "^5.5.2",
    "@ionic/pwa-elements": "^3.0.2",
    "@ionic/storage": "^2.3.1",
    "cordova-open-native-settings": "^1.5.3",
    "cordova-plugin-badge": "^0.8.8",
    "cordova-plugin-request-location-accuracy": "^2.3.0",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1100.5",
    "@angular/cli": "~11.0.5",
    "@angular/compiler": "~11.0.5",
    "@angular/compiler-cli": "~11.0.5",
    "@angular/language-service": "~11.0.5",
    "@capacitor/cli": "2.4.6",
    "@ionic/angular-toolkit": "^2.3.3",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "codelyzer": "^6.0.0",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.1.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "^4.0.5"
  },

Looking for maintainers!

The @capacitor-community/firebase-analytics project is the 5th most popular Capacitor Community project on npm (based on weekly downloads). The project is being updated for v3 by the core team at the moment, but we need the community's help to continue development.

If you are interested in helping maintaining this plugin, you can comment here or contact @ThomasV on the Capacitor Slack. to help you get set up on the Capacitor Community Github org 😄

Can we have new release to support capacitor 2 with android build

Hello,

can you please make new release to support building project with android after upgrading to capacitor 2 I'm having issues when try to sync or build the project I get this error

Build file '/Users/xxxxx/code/xxxx-mobile/node_modules/capacitor-analytics/android/build.gradle' line: 50
A problem occurred evaluating project ':capacitor-analytics'.
> No such property: config for class: com.google.gms.googleservices.GoogleServicesPlugin

Compile release mode

Hi,

I was able to use the plugin but when I am trying to make a realease version I got a Gandle error and I am not able to do it.

Do you have any way to avoid this?

Thanks

Still maintained??

Is this project still maintained? It looks like it’s been awhile since it’s been updated.

Erro remoteConfig()

I'm having a problem in version 0.2.0

an error in remoteConfig ()

ERROR in node_modules/@capacitor-community/firebase-analytics/dist/esm/web.d.ts: 90: 9 - error TS1086: An accessor cannot be declared in an ambient context.

90 get remoteConfig (): any;

Could you tell me how to solve this problem.

Version 0.3.0 has dependency of Capacitor 3

Describe the bug
[email protected] has dependency @capacitor/core@^3.0.0. Capacitor 3 support looks to be in beta and has not yet been officially released. Plugins behave differently in Capacitor 3 and this is causing the plugin to no longer function with Capacitor 2 projects.

This is causing the following error:

Error: node_modules/@capacitor-community/firebase-analytics/node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
  Types of property 'Plugins' are incompatible.
    Property 'FirebaseAnalytics' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.

16 export interface CapacitorInstance extends CapacitorGlobal {
                    ~~~~~~~~~~~~~~~~~

  node_modules/@capacitor-community/firebase-analytics/dist/esm/definitions.d.ts:3:9
    3         FirebaseAnalytics: FirebaseAnalyticsPlugin;
              ~~~~~~~~~~~~~~~~~
    'FirebaseAnalytics' is declared here.

To Reproduce
Steps to reproduce the behavior:
Run production build on Angular project using @capacitor/core@^2.4.7 and [email protected].

Expected behavior
Type definitions to work properly with Capacitor 2 until support for Capacitor 3 is officially released

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Angular: 11.0.2

Deep Link does not contain valid required params.

Describe the bug
Returning to the app from a card confirmation via the Braintree SDK throws an error on firebase analytics.

To Reproduce
Steps to reproduce the behavior:

  1. Pay with a card that required 3d secure
  2. Complete the bank verification questions into the poup
  3. Return back to the app
  4. See error

** Error **

2021-04-15 15:54:59.345010+0200 App[10949:4541340] 7.10.0 - [Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    "auth_response" = "{\"threeDSecureInfo\":{\"liabilityShifted\":true,\"liabilityShiftPossible\":true},\"paymentMethod\":{\"type\":\"CreditCard\",\"nonce\":\"

Smartphone (please complete the following information):

  • Device: iPhone 11 Pro
  • OS: iOS 14
  • Version: 1.0.0-alpha.0

Typescript support

I am implementing firebase-analytics for mobile app and I am using angular. I am not sure if I am missing something but once I hover on some function I don't see any information in VS Code regarding its parameters and output.

Is the project missing types declaration?

I am using TSlint if it helps.
Example of my implementation, hovering on logEvent() only shows any:

import { Plugins } from '@capacitor/core';
const { FirebaseAnalytics } = Plugins;

publishEvent(event: Event): void {
  FirebaseAnalytics.logEvent({ name: eventName, params: value });
}

Several crashes on Android reported by Crashlytics

Describe the bug
I'm getting many crashes reported by Firebase Crashlytics caused by some messaging dependency (com.google.firebase.iid.zzbe and com.getcapacitor.CapacitorFirebaseMessagingService) .

To Reproduce
I was not able to reproduce it consistently. The error happened more frequent in production.

Expected behavior
While I can handle some crashes here and there due to huge ecosystem Android has, I've had a very small number Crash-Free users on Android, 64%.

Screenshots
Link to gallery
SS 1
SS 2
SS 3
SS 4

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
Android devices. No pattern has been found in terms of OS Versions

Additional context
I'm also using some other capacitor-community plugins that may have some impact (@capacitor-community/admob, @capacitor-community/firebase-analytics, @capacitor-community/firebase-crashlytics, @capacitor-community/firebase-remote-config, @capacitor-community/media). I'll attach the complete plugin list below:

ionic info
Ionic:

   Ionic CLI                     : 6.12.0 
   Ionic Framework               : @ionic/angular 5.3.4
   @angular-devkit/build-angular : 0.901.12
   @angular-devkit/schematics    : 9.1.12
   @angular/cli                  : 9.1.12
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2

Utility:

   cordova-res                          : not installed
   native-run (update available: 1.2.1) : 1.0.0

System:

   NodeJS : v14.6.0
   npm    : 6.14.8
   OS     : macOS Catalina

package.json

"dependencies": {
    "@angular/common": "^9.1.12",
    "@angular/core": "^9.1.12",
    "@angular/forms": "^9.1.12",
    "@angular/platform-browser": "^9.1.12",
    "@angular/platform-browser-dynamic": "^9.1.12",
    "@angular/router": "^9.1.12",
    "@capacitor-community/admob": "^1.2.0-0",
    "@capacitor-community/firebase-analytics": "^0.2.0",
    "@capacitor-community/firebase-crashlytics": "^0.3.0",
    "@capacitor-community/firebase-remote-config": "^0.1.3",
    "@capacitor-community/media": "^1.0.1",
    "@capacitor/android": "^2.4.0",
    "@capacitor/core": "^2.4.0",
    "@capacitor/ios": "^2.4.0",
    "@ionic-native/core": "^5.28.0",
    "@ionic-super-tabs/angular": "^7.0.8",
    "@ionic/angular": "^5.3.2",
    "@ionic/storage": "^2.3.0",
    "@ngx-translate/core": "^12.1.2",
    "@ngx-translate/http-loader": "^4.0.0",
    "cordova-sqlite-storage": "^5.0.1",
    "ngx-countup": "^7.3.3",
    "rxjs": "~6.5.1",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.901.12",
    "@angular/cli": "^9.1.12",
    "@angular/compiler": "^9.1.12",
    "@angular/compiler-cli": "^9.1.12",
    "@angular/language-service": "^9.1.12",
    "@capacitor/cli": "^2.4.0",
    "@ionic/angular-toolkit": "^2.3.3",
    "@types/jasmine": "^3.5.14",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.12.54",
    "codelyzer": "^5.1.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^5.2.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~2.1.0",
    "karma-jasmine": "~3.0.1",
    "karma-jasmine-html-reporter": "^1.4.2",
    "ts-node": "~8.3.0",
    "tslint": "^6.1.3",
    "typescript": "~3.8.3"
  }

Error: userId is missing when trying to setScreenName

Describe the bug
When trying to setScreenName with FirebaseAnalytics.setScreenName({ name: page }); I get an error Error while set screen to analytics! Error: userId is missing

To Reproduce
Steps to reproduce the behavior:

  1. Setup the plugin and call setScreenName
  2. The event is not sent to Firebase Analytics due the mentioned error

Expected behavior
Error wouldn't be thrown

Screenshots
Add below

Desktop (please complete the following information):

  • OS: Android

** additional description
I even tried to setUserId (although according to Firebase docs shouldn't be needed) using the below but to no avail:

FirebaseAnalytics.setUserId({
  userId: "john_doe_123"
});

image
image

iOS requestTrackingAuthorization

Hi Guys,

is there a way to trigger a permission request like it is possible for other permissions like location, notifications, camera etc.?

I added NSUserTrackingUsageDescription to my Info.plist file. But this is only the message which will be shown inside the request dialog.

According to Apple (https://developer.apple.com/documentation/apptrackingtransparency) there is a native method whichg is called requestTrackingAuthorization. But how can I trigger this method from my typescript code?

Currently I've build an own dialog using the capacitor dialog plugin and then I enable or disable Analytics with the setCollectionEnabled method according to the user input. Before that I'm not tracking anything. Seems legit to me, but I'm not sure If this works for Apple as well.

How can this be done correctly?

Error on XCode build

I have followed the setup instructions I am getting the following error using XCode 11.3:

type 'analytics' has no member 'setAnalyticsCollectionEnabled'

It has the same error in the following places at line Analytics.setAnalyticsCollectionEnabled:

  @objc func enable(_ call: CAPPluginCall) {
    DispatchQueue.main.async {
      Analytics.setAnalyticsCollectionEnabled(true)
      call.success()
    }
  }
  
  @objc func disable(_ call: CAPPluginCall) {
    DispatchQueue.main.async {
      Analytics.setAnalyticsCollectionEnabled(false)
      call.success()
    }
  }

It is working fine on Android.
I have tried it with and without the 'enable' in the code.

enable() {
    return analytics.enable();
  }
Ionic:

   Ionic CLI                     : 5.4.5 (C:\Users\fullo\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.11.1
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Capacitor:

   Capacitor CLI   : 1.1.1
   @capacitor/core : 1.1.1

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 6 other plugins)

iOS: setCollectionEnabled() and setSessionTimeoutDuration() never resolve

Describe the bug
The setCollectionEnabled() and setSessionTimeoutDuration() iOS functions never resolve, and using them with await effectively halts further typescript code execution.

To Reproduce
Steps to reproduce the behavior:

When enabling firebase analytics collection in your app, use await to trigger this issue:

...
await FirebaseAnalytics.setCollectionEnabled({ enabled: true });
...

Expected behavior

FirebaseAnalytics.setCollectionEnabled() should either resolve or reject.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
iOS

Additional context
Currently working on a PR for this

Ecommerce Items NSNumber Parameters Error For Ios

Hi, i want to measure ecommerce events.

You can see documentation for GA4 ecommerce event parameters for analytics with this link.
https://developers.google.com/analytics/devguides/collection/ga4/ecommerce

Firstly; android and web plugins works perfect.
But ios plugun has some issues.

If you send this ecommerce events with ios application;

  • view_item_list
  • view_item
  • select_item
  • add_to_cart
  • purchase
  • etc.
    quantity parameter(in the items) every time "0".

You can see my debug screenshots.

XCODE terminal screenshot;
image

Google anlytics debug view screenshot;
image

Docs: What is meant by "clears all analytics data"?

Describe the bug

In the docs for .reset(), it states:

* Clears all analytics data for this app from the device and resets the app instance id.

What does "all analytics data" mean? I thought that this would clear the Google Analytics cookies from the web browser, but it does not.

To Reproduce

I'm using an Ionic React app with Capacitor 3 that automatically enables/disables Firebase Analytics when the user logs in (based on a value on the returned user object).

export const activateAnalytics = (status: boolean): void => {
  console.log('analytics setup based on status', status);
  FirebaseAnalytics.setCollectionEnabled({
    enabled: status,
  });
  if (!status) {
    FirebaseAnalytics.reset();
  }
};

However, when a user with analytics disabled logs in to the Ionic app from the web, tracking stops as expected (according to Firebase Analytics real-time dashboard), but the GA cookies remain in the browser.

Is this the expected behavior (cookies remain after calling FirebaseAnalytics.reset()? If so, I suggest updating the documentation to say something like, "This does not clear the GA cookies."

Firebase analytics is not initialized on iOS

Describe the bug
Documentation states to use initializeFirebase only for web devices, but i'm getting an initilization problem in iOs too.

To Reproduce
Steps to reproduce the behavior:

  1. Launch the application.
  2. Go to Firebase Analytics debug mode, you won't see any new event incoming.
  3. Go to the Safari's web inspector and open a debugger for the device.
  4. Go to the console and see the error.

Expected behavior
As Android, it should be initialized itself without to do it manually in code.

Screenshots
If applicable, add screenshots to help explain your problem.
Captura de Pantalla 2020-12-09 a la(s) 14 12 51

Desktop (please complete the following information):

  • OS: Mac OsX 10.15.7
  • Browser Safari
  • Version 14.0.1 (15610.2.11.51.10, 15610)

Smartphone (please complete the following information):

  • Device: iPhone 8 Plus
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Unable to archive with Bitcode enabled

Describe the bug

  • Xcode version: 11.4.1
  • Firebase SDK version: 7.11.0
  • Firebase Component: Analytics

Couldn't build apps with Bitcode enabled. Below is the error I'm getting while building the app for iPad devices,


▸ Compiling CapacitorCommunityFirebaseAnalytics_vers.c
▸ Compiling Plugin.m
▸ Compiling CapacitorCommunityFirebaseAnalytics-dummy.m
▸ Touching CapacitorCommunityFirebaseAnalytics.framework (in target 'CapacitorCommunityFirebaseAnalytics' from project 'Pods')
▸ Copying Pods-App-umbrella.h
▸ Processing Pods-App-Info.plist
▸ Compiling Pods-App-dummy.m
▸ Compiling Pods_App_vers.c
▸ Touching Pods_App.framework (in target 'Pods-App' from project 'Pods')
▸ Running script '[CP] Check Pods Manifest.lock'
▸ Compiling AppDelegate.swift
▸ Linking App

❌  ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1200.0.32.2.0_0' Reader: '1103.0.32.59_0')', using libLTO version 'LLVM version 11.0.3, (clang-1103.0.32.59)' for architecture arm64



❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)


** ARCHIVE FAILED **


The following build commands failed:
	Ld /Users/sekars/Library/Developer/Xcode/DerivedData/App-buqylyqebjbcffaltpbqiokfcssp/Build/Intermediates.noindex/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app/App normal arm64
(1 failure)
[15:39:40]: Exit status: 65

+-------------+-------------------------+
|           Build environment           |
+-------------+-------------------------+
| xcode_path  | /Applications/Xcode.app |
| gym_version | 2.181.0                 |
| sdk         | iPhoneOS13.4.sdk        |
+-------------+-------------------------+

The above issue is reproducible in multiple code versions I have tried. Everything goes smooth when the Bitcode is disabled. Any thoughts on this? I'm using the latest version of CapacitorCommunity/FirebaseAnalytics. Let me know if you need more details from my side.

No podspec found

I've installed the plugin, but when i sync the project i get the following error

[error] Error running update: Analyzing dependencies
[!] No podspec found for CapacitorCommunityFirebaseAnalytics in ../../node_modules/@capacitor-community/firebase-analytics

This is my podfile

platform :ios, '11.0'
use_frameworks!

workaround to avoid Xcode caching of Pods that requires

Product -> Clean Build Folder after new Cordova plugins installed

Requires CocoaPods 1.6 or newer

install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods

Automatic Capacitor Pod dependencies, do not delete

pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCommunityFirebaseAnalytics', :path => '../../node_modules/@capacitor-community/firebase-analytics'
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
pod 'CordovaPluginsStatic', :path => '../capacitor-cordova-ios-plugins'
# Do not delete
end

target 'App' do
capacitor_pods

Add your Pods here

end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.