@capacitor-community/firebase-analytics
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "@capacitor-community/firebase-analytics", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A native plugin for firebase analytics.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/capacitor-community/firebase-analytics", |
@@ -290,3 +290,3 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||
> on your `MainActivity.java` file add `import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;` and then inside the init callback `add(AnalyticsPlugin.class);` | ||
> on your `MainActivity.java` file add `import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;` and then inside the init callback `add(FirebaseAnalytics.class);` | ||
@@ -307,10 +307,38 @@ Now you should be set to go. Try to run your client using `ionic cap run android --livereload --address=0.0.0.0`. | ||
1. rename dep in package.json from `capacitor-analytics` to `@capacitor-community/firebase-analytics` | ||
2. on android's _MainActivity.java_ change the import path from `io.stewan.capacitor.analytics.AnalyticsPlugin;` to `com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;` | ||
3. public api changes | ||
- `instance()` is now `getAppInstanceId()` | ||
- `setScreen()` is now `setScreenName()` | ||
- `setUserID()` is now `setUserId()` | ||
- `setUserProp()` us now `setUserProperty()` | ||
1. Update NPM package: | ||
```bash | ||
npm uninstall --save capacitor-analytics | ||
npm install --save-prod @capacitor-community/firebase-analytics | ||
``` | ||
1. Update the plugin initialization in Android's _MainActivity.java_ | ||
Update the plugin import: | ||
```diff | ||
-import io.stewan.capacitor.analytics.AnalyticsPlugin; | ||
+import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics; | ||
``` | ||
Update the `init()` call to use the new plugin import: | ||
```diff | ||
// 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); | ||
+ add(FirebaseAnalytics.class); | ||
}}); | ||
``` | ||
1. 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 | ||
@@ -317,0 +345,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 13 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
347
1
147207
39
446