Skip to content

Commit

Permalink
Major version: 12.0.0-cli
Browse files Browse the repository at this point in the history
Merge branch 'master' into cli_build
  • Loading branch information
dpa99c committed Mar 23, 2021
2 parents 9dc5cb0 + 26f84c4 commit 139f676
Show file tree
Hide file tree
Showing 10 changed files with 313 additions and 152 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# Version 12.0.0-cli
* (iOS) BREAKING CHANGE: Major version update to Firebase iOS SDK from v6 to v7 ([v7.8.1 - 12 March 2021](https://firebase.google.com/support/release-notes/ios#version_781_-_march_12_2021))
* Requires `cocoapods@1.10` (previously `cocoapods@1.9`)
* Removes `developerModeEnabled` property from `getInfo()` Remote Config response as this was removed in the latest Firebase SDK
* Removes direct channel support for Firebase Messaging as no longer supported by Firebase iOS SDK v7.
* Resolves [#561](https://github.com/dpa99c/cordova-plugin-firebasex/issues/561).
* (Android) BREAKING CHANGE: Major version update to Firebase Android BOM from v25 to v26 ([v26.7.0 - 11 March 2021](https://firebase.google.com/support/release-notes/android#bom_v26-7-0))
* Removes `developerModeEnabled` property from `getInfo()` Remote Config response as this was removed in the latest Firebase SDK
* (iOS) Bugfix: Fix conflict with [cordova-plugin-local-notifications](https://github.com/katzer/cordova-plugin-local-notifications) to enable both remote notifications via this plugin and local notifications via that plugin to work simultaneously in the same app.
* Merged from PR [#573](https://github.com/dpa99c/cordova-plugin-firebasex/pull/573).
* Resolves [#230](https://github.com/dpa99c/cordova-plugin-firebasex/issues/230).
* (Android) Feature: add support for calling [Firebase Functions](https://firebase.google.com/docs/functions/callable)
* Merged from PR [#509](https://github.com/dpa99c/cordova-plugin-firebasex/pull/509).
* (iOS) Bugfix: Add base class to `FirebasePluginMessageReceiverManager` to prevent Xcode build error
* Merged from PR [#579](https://github.com/dpa99c/cordova-plugin-firebasex/pull/579).
* (Android) Bugfix: Fix GSON serialization of `NaN` values in Firestore
* Merged from PR [#584](https://github.com/dpa99c/cordova-plugin-firebasex/pull/584).
* (Android) Bugfix: Fix serialization of JSON arrays and objects in `logEvent()` for Analytics
* Merged from PR [#598](https://github.com/dpa99c/cordova-plugin-firebasex/pull/598).
* (iOS) Bugfix: Fix reading of all Remote Config keys in `getAll()` by falling back if default source is empty.
* (iOS) Bugfix: Register notification delegate during didFinishLaunching to ensure notifications are ready when app starts.
* Resolves [#542](https://github.com/dpa99c/cordova-plugin-firebasex/issues/542).
* (iOS) Bugfix: Make interaction with firestoreListeners thread-safe.
* Resolves [#574](https://github.com/dpa99c/cordova-plugin-firebasex/issues/574).
* (iOS) Bugfix: Ensure traces array is always defined before referencing it.
* Resolves [#602](https://github.com/dpa99c/cordova-plugin-firebasex/issues/602).
* (iOS) Bugfix: Gracefully handle sending empty error message to logError.
* Resolves [#555](https://github.com/dpa99c/cordova-plugin-firebasex/issues/555).
* (iOS) Bugfix: Gracefully handle errors in fetching token data when returning user info.
* (Android) Bugfix: Gracefully handle errors when attempting to retrieve ID token when fetching current user info.
* Resolves [#566](https://github.com/dpa99c/cordova-plugin-firebasex/issues/566).

# Version 11.0.3-cli
* (Android) Make Firebase Performance Monitoring Gradle plugin optional (disabled by default) via `ANDROID_FIREBASE_PERFORMANCE_MONITORING` plugin variable due to increased build times/memory usage when it's included.
* (Android) Add defensive code in `handleExceptionWithContext()` to prevent app crashes.
Expand Down
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ To help ensure this plugin is kept updated, new features are added and bugfixes
- [listenToDocumentInFirestoreCollection](#listentodocumentinfirestorecollection)
- [listenToFirestoreCollection](#listentofirestorecollection)
- [removeFirestoreListener](#removefirestorelistener)
- [Functions](#functions)
- [functionsHttpsCallable](#functionshttpscallable)
- [Credits](#credits)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand Down Expand Up @@ -470,7 +472,7 @@ Therefore if you need to change the specified versions, you'll currently need to
### Cocoapods
This plugin relies on `cordova@9`/`cordova-ios@5` support for the [CocoaPods dependency manager]( https://cocoapods.org/) in order to satisfy the iOS Firebase SDK library dependencies.

Therefore please make sure you have `cocoapods@>=1.9` installed in your iOS build environment - setup instructions can be found [here](https://cocoapods.org/).
Please make sure you have `cocoapods@>=1.10` installed in your iOS build environment - setup instructions can be found [here](https://cocoapods.org/).

If building your project in Xcode, you need to open `YourProject.xcworkspace` (not `YourProject.xcodeproj`) so both your Cordova app project and the Pods project will be loaded into Xcode.

Expand Down Expand Up @@ -3456,6 +3458,32 @@ For example:
}
```

## Functions
(Android only)

### functionsHttpsCallable
Call a firebase [Https Callable function](https://firebase.google.com/docs/functions/callable)

**Parameters**:
- {string} name - the name of the function
- {object} args - arguments to send to the function
- {function} success - callback function to call on successfully completed the function call.
Will be passed an {object/array/string} containing the data returned by the function
- {function} error - callback function which will be passed a {string/object} error message as an argument.

```javascript
var functionName = "myBackendFunction";
var args = {
arg1: 'First argument',
arg2: 'second argument'
};
FirebasePlugin.functionsHttpsCallable(functionName, args, function(result){
console.log("Successfully called function: "+JSON.stringify(result));
}, function(error){
console.error("Error calling function: "+JSON.stringify(error));
});
```

This can be used to subsequently remove the listener using this function.

You should remove listeners when you're not using them as while active they maintain a continual HTTP connection to the Firebase servers costing memory, bandwith and money: see [best practices for realtime updates](https://firebase.google.com/docs/firestore/best-practices#realtime_updates) and [billing for realtime updates](https://firebase.google.com/docs/firestore/pricing#listens).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-firebasex",
"version": "11.0.3-cli",
"version": "12.0.0-cli",
"description": "Cordova plugin for Google Firebase",
"types": "./types/index.d.ts",
"author": {
Expand Down
38 changes: 20 additions & 18 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-firebasex" version="11.0.3-cli"
<plugin id="cordova-plugin-firebasex" version="12.0.0-cli"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<name>Google Firebase Plugin</name>
Expand Down Expand Up @@ -59,17 +59,18 @@
<framework src="src/android/build.gradle" custom="true" type="gradleReference" />

<!-- Default versions for Gradle dependencies -->
<preference name="ANDROID_PLAY_SERVICES_AUTH_VERSION" default="18.1.0" />
<preference name="ANDROID_FIREBASE_ANALYTICS_VERSION" default="17.5.0" />
<preference name="ANDROID_FIREBASE_MESSAGING_VERSION" default="20.3.0" />
<preference name="ANDROID_FIREBASE_CONFIG_VERSION" default="19.2.0" />
<preference name="ANDROID_FIREBASE_PERF_VERSION" default="19.0.9" />
<preference name="ANDROID_FIREBASE_AUTH_VERSION" default="19.4.0" />
<preference name="ANDROID_FIREBASE_FIRESTORE_VERSION" default="21.7.0" />
<preference name="ANDROID_FIREBASE_CRASHLYTICS_VERSION" default="17.2.2" />
<preference name="ANDROID_FIREBASE_CRASHLYTICS_NDK_VERSION" default="17.2.2" />
<preference name="ANDROID_PLAY_SERVICES_AUTH_VERSION" default="19.0.0" />
<preference name="ANDROID_FIREBASE_ANALYTICS_VERSION" default="18.0.2" />
<preference name="ANDROID_FIREBASE_MESSAGING_VERSION" default="21.0.1" />
<preference name="ANDROID_FIREBASE_CONFIG_VERSION" default="20.0.4" />
<preference name="ANDROID_FIREBASE_PERF_VERSION" default="19.1.1" />
<preference name="ANDROID_FIREBASE_AUTH_VERSION" default="20.0.3" />
<preference name="ANDROID_FIREBASE_FIRESTORE_VERSION" default="22.1.1" />
<preference name="ANDROID_FIREBASE_FUNCTIONS_VERSION" default="19.2.0" />
<preference name="ANDROID_FIREBASE_CRASHLYTICS_VERSION" default="17.4.0" />
<preference name="ANDROID_FIREBASE_CRASHLYTICS_NDK_VERSION" default="17.4.0" />
<preference name="ANDROID_GSON_VERSION" default="2.8.6" />
<preference name="ANDROID_FIREBASE_PERF_GRADLE_PLUGIN_VERSION" default="1.3.1" />
<preference name="ANDROID_FIREBASE_PERF_GRADLE_PLUGIN_VERSION" default="1.3.5" />

<framework src="com.google.android.gms:play-services-auth:$ANDROID_PLAY_SERVICES_AUTH_VERSION" />
<framework src="com.google.firebase:firebase-analytics:$ANDROID_FIREBASE_ANALYTICS_VERSION" />
Expand All @@ -78,6 +79,7 @@
<framework src="com.google.firebase:firebase-perf:$ANDROID_FIREBASE_PERF_VERSION" />
<framework src="com.google.firebase:firebase-auth:$ANDROID_FIREBASE_AUTH_VERSION" />
<framework src="com.google.firebase:firebase-firestore:$ANDROID_FIREBASE_FIRESTORE_VERSION" />
<framework src="com.google.firebase:firebase-functions:$ANDROID_FIREBASE_FUNCTIONS_VERSION" />
<framework src="com.google.firebase:firebase-crashlytics:$ANDROID_FIREBASE_CRASHLYTICS_VERSION" />
<framework src="com.google.firebase:firebase-crashlytics-ndk:$ANDROID_FIREBASE_CRASHLYTICS_NDK_VERSION" />
<framework src="com.google.code.gson:gson:$ANDROID_GSON_VERSION" />
Expand Down Expand Up @@ -130,13 +132,13 @@
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods use-frameworks="true">
<pod name="Firebase/Core" spec="6.33.0"/>
<pod name="Firebase/Auth" spec="6.33.0"/>
<pod name="Firebase/Messaging" spec="6.33.0"/>
<pod name="Firebase/Performance" spec="6.33.0"/>
<pod name="Firebase/RemoteConfig" spec="6.33.0"/>
<pod name="FirebaseFirestore" git="https://github.com/invertase/firestore-ios-sdk-frameworks.git" tag="6.33.0"/>
<pod name="Firebase/Crashlytics" spec="6.33.0"/>
<pod name="Firebase/Core" spec="7.8.1"/>
<pod name="Firebase/Auth" spec="7.8.1"/>
<pod name="Firebase/Messaging" spec="7.8.1"/>
<pod name="Firebase/Performance" spec="7.8.1"/>
<pod name="Firebase/RemoteConfig" spec="7.8.1"/>
<pod name="FirebaseFirestore" git="https://github.com/invertase/firestore-ios-sdk-frameworks.git" tag="7.8.1"/>
<pod name="Firebase/Crashlytics" spec="7.8.1"/>
<pod name="GoogleSignIn" spec="5.0.2"/>
</pods>
</podspec>
Expand Down
Loading

0 comments on commit 139f676

Please sign in to comment.