Skip to content

chore(firebaseai): merge main into developer api branch #17341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
melos exec -c 1 --scope="*example*" --dir-exists="web" -- \
"flutter build web"
swift-integration:
runs-on: macos-latest
runs-on: macos-15
timeout-minutes: 30
env:
FLUTTER_DEPENDENCIES: "cloud_firestore firebase_remote_config cloud_functions firebase_database firebase_auth firebase_storage firebase_analytics firebase_messaging firebase_app_check firebase_in_app_messaging firebase_performance firebase_dynamic_links firebase_crashlytics firebase_ml_model_downloader firebase_app_installations"
Expand Down
2,923 changes: 971 additions & 1,952 deletions .github/workflows/scripts/functions/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/scripts/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"main": "lib/index.js",
"dependencies": {
"firebase-admin": "^11.5.0",
"firebase-functions": "^4.5.0"
"firebase-admin": "^13.2.0",
"firebase-functions": "^6.3.2"
},
"devDependencies": {
"firebase-functions-test": "^0.2.0",
Expand Down
127 changes: 95 additions & 32 deletions .github/workflows/scripts/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,99 @@ import * as assert from 'assert';
import * as functions from 'firebase-functions';
import * as functionsv2 from 'firebase-functions/v2';


// For example app.
// noinspection JSUnusedGlobalSymbols
export const listFruit = functions.https.onCall(() => {
return ['Apple', 'Banana', 'Cherry', 'Date', 'Fig', 'Grapes'];
});

export const listfruits2ndgen = functionsv2.https.onCall(() => {
return ['Apple', 'Banana', 'Cherry', 'Date', 'Fig', 'Grapes'];
export const listfruits2ndgen = functionsv2.https.onCall((res, req) => {
const fruitList = ['Apple', 'Banana', 'Cherry', 'Date', 'Fig', 'Grapes'];
const allFruits = fruitList.map(async (fruit) => {
if (res.acceptsStreaming) {
req?.sendChunk(fruit)
}
})
return Promise.all(allFruits);
});

// For e2e testing a custom region.
// noinspection JSUnusedGlobalSymbols
export const testFunctionCustomRegion = functions
.region('europe-west1')
.https.onCall(() => 'europe-west1');

export const testFunctionCustomRegion = functions.https.onCall(
{
region: 'europe-west1'
},
() => 'europe-west1'
);

// For e2e testing timeouts.
export const testFunctionTimeout = functions.https.onCall((data) => {
export const testFunctionTimeout = functions.https.onCall((req, res) => {
const data = req.data
console.log(JSON.stringify({ data }));
return new Promise((resolve, reject) => {
if (data && data.testTimeout) {
setTimeout(
() => resolve({ timeLimit: 'exceeded' }),
parseInt(data.testTimeout, 10)
);
} else {
reject(
new functions.https.HttpsError(
'invalid-argument',
'testTimeout must be provided.'
)
);
}

const timeoutMs = parseInt(data?.testTimeout, 10);

if (isNaN(timeoutMs)) {
throw new functions.https.HttpsError(
'invalid-argument',
'testTimeout must be provided.'
);
}

if (req.acceptsStreaming) {
setTimeout(() => {
res?.sendChunk({ timeLimit: 'exceeded' });
}, timeoutMs);

return new Promise((resolve) => {
setTimeout(resolve, timeoutMs + 100);
});
}

return new Promise((resolve) => {
setTimeout(() => resolve({ timeLimit: 'exceeded' }), timeoutMs);
});

});

// For e2e testing errors & return values.
// noinspection JSUnusedGlobalSymbols
export const testFunctionDefaultRegion = functions.https.onCall((data) => {
export const testFunctionDefaultRegion = functions.https.onCall((req, res) => {
const data = req.data;
console.log(JSON.stringify({ data }));
if (typeof data === 'undefined') {
return 'undefined';
}

const sendResponse = (value: any) => {
if (req.acceptsStreaming && res) {
res.sendChunk(value);
return value;
}
return value;
};

if (typeof data === 'string') {
return 'string';
return sendResponse('string');
}

if (typeof data === 'number') {
return 'number';
return sendResponse('number');
}

if (typeof data === 'boolean') {
return 'boolean';
return sendResponse('boolean');
}

if (data === null) {
return 'null';
return sendResponse('null');
}

if (Array.isArray(data)) {
return 'array';
return sendResponse('array');
}

if(data.type === 'rawData') {
return data;
if (data.type === 'rawData') {
return sendResponse(data);
}

const sampleData: {
Expand Down Expand Up @@ -153,9 +180,45 @@ export const testFunctionDefaultRegion = functions.https.onCall((data) => {
);
}

return outputData;
return sendResponse(outputData);
});

export const testMapConvertType = functions.https.onCall((data) => ({
foo: 'bar',
}));

export const testStream = functions.https.onCall((req, res) => {
const data = req.data;
if (data === null || undefined) {
if (req.acceptsStreaming) {
res?.sendChunk('null');
}
return
}

const results = [];
results.push(data)

const allResults = results.map(async (result) => {
if (req.acceptsStreaming) {
res?.sendChunk(result);
}
return result;
});
return Promise.all(allResults);
})

export const testStreamResponse = functions.https.onCall(async (request, response) => {
const fruits = ['Apple', 'Mango', 'Banana']

const allFruits = fruits.map(async (fruit) => {
// Stream each fruit as it resolves!
if (request.acceptsStreaming) {
response?.sendChunk(fruit);
}
return fruit;
});

// Fallback for non-streaming clients
return Promise.all(allFruits);
});
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,68 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2025-04-28 - [BoM 3.10.0](https://github.com/firebase/flutterfire/blob/main/VERSIONS.md#flutter-bom-3100-2025-04-28)

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`cloud_firestore` - `v5.6.7`](#cloud_firestore---v567)
- [`cloud_firestore_platform_interface` - `v6.6.7`](#cloud_firestore_platform_interface---v667)
- [`cloud_functions` - `v5.5.0`](#cloud_functions---v550)
- [`cloud_functions_platform_interface` - `v5.7.0`](#cloud_functions_platform_interface---v570)
- [`cloud_functions_web` - `v4.11.0`](#cloud_functions_web---v4110)
- [`firebase_auth` - `v5.5.3`](#firebase_auth---v553)
- [`firebase_vertexai` - `v1.6.0`](#firebase_vertexai---v160)
- [`cloud_firestore_web` - `v4.4.7`](#cloud_firestore_web---v447)
- [`firebase_data_connect` - `v0.1.4+1`](#firebase_data_connect---v0141)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

- `cloud_firestore_web` - `v4.4.7`
- `firebase_data_connect` - `v0.1.4+1`

---

#### `cloud_firestore` - `v5.6.7`

- **FIX**(firestore): Change asserts to throw argumentError ([#17302](https://github.com/firebase/flutterfire/issues/17302)). ([ec1e6a5e](https://github.com/firebase/flutterfire/commit/ec1e6a5eef149680b2750900d1f16d8074e09b38))
- **FIX**(cloud_firestore): correct nanoseconds calculation for pre-1970 dates ([#17195](https://github.com/firebase/flutterfire/issues/17195)). ([a13deae3](https://github.com/firebase/flutterfire/commit/a13deae3334045fb1a48817ff9300cbe0696d177))

#### `cloud_firestore_platform_interface` - `v6.6.7`

- **FIX**(cloud_firestore): correct nanoseconds calculation for pre-1970 dates ([#17195](https://github.com/firebase/flutterfire/issues/17195)). ([a13deae3](https://github.com/firebase/flutterfire/commit/a13deae3334045fb1a48817ff9300cbe0696d177))

#### `cloud_functions` - `v5.5.0`

- **FEAT**(cloud_functions): add support for cloud functions stream ([#17214](https://github.com/firebase/flutterfire/issues/17214)). ([509e0f3c](https://github.com/firebase/flutterfire/commit/509e0f3cc984a7b56a67979b4b27aff72defdd55))

#### `cloud_functions_platform_interface` - `v5.7.0`

- **FEAT**(cloud_functions): add support for cloud functions stream ([#17214](https://github.com/firebase/flutterfire/issues/17214)). ([509e0f3c](https://github.com/firebase/flutterfire/commit/509e0f3cc984a7b56a67979b4b27aff72defdd55))

#### `cloud_functions_web` - `v4.11.0`

- **FEAT**(cloud_functions): add support for cloud functions stream ([#17214](https://github.com/firebase/flutterfire/issues/17214)). ([509e0f3c](https://github.com/firebase/flutterfire/commit/509e0f3cc984a7b56a67979b4b27aff72defdd55))

#### `firebase_auth` - `v5.5.3`

- **FIX**(auth,iOS): include missing email and credential in account-exists-with-different-credential error ([#17180](https://github.com/firebase/flutterfire/issues/17180)). ([2a0bdc64](https://github.com/firebase/flutterfire/commit/2a0bdc64086e99f8a98bd18b472b36bcfe05a9a4))

#### `firebase_vertexai` - `v1.6.0`

- **FIX**(vertexai): add missing HarmBlockThreshold to exported APIs ([#17249](https://github.com/firebase/flutterfire/issues/17249)). ([59d902c6](https://github.com/firebase/flutterfire/commit/59d902c63bd1bd040f5357cb6a341db446429430))
- **FEAT**(vertexai): Live API breaking changes ([#17299](https://github.com/firebase/flutterfire/issues/17299)). ([69cd2a64](https://github.com/firebase/flutterfire/commit/69cd2a640d25e0f2b623f2e631d090ead8af140d))


## 2025-03-31 - [BoM 3.9.0](https://github.com/firebase/flutterfire/blob/main/VERSIONS.md#flutter-bom-390-2025-03-31)

### Changes
Expand Down
39 changes: 39 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,45 @@ This document is listing all the compatible versions of the FlutterFire plugins.

# Versions

## [Flutter BoM 3.10.0 (2025-04-28)](https://github.com/firebase/flutterfire/blob/main/CHANGELOG.md#2025-04-28)

Install this version using FlutterFire CLI

```bash
flutterfire install 3.10.0
```

### Included Native Firebase SDK Versions
| Firebase SDK | Version | Link |
|--------------|---------|------|
| Android SDK | 33.11.0 | [Release Notes](https://firebase.google.com/support/release-notes/android) |
| iOS SDK | 11.10.0 | [Release Notes](https://firebase.google.com/support/release-notes/ios) |
| Web SDK | 11.5.0 | [Release Notes](https://firebase.google.com/support/release-notes/js) |
| Windows SDK | 12.7.0 | [Release Notes](https://firebase.google.com/support/release-notes/cpp-relnotes) |

### FlutterFire Plugin Versions
| Plugin | Version | Dart Version | Flutter Version |
|--------|---------|--------------|-----------------|
| [cloud_firestore](https://pub.dev/packages/cloud_firestore/versions/5.6.7) | 5.6.7 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [cloud_functions](https://pub.dev/packages/cloud_functions/versions/5.5.0) | 5.5.0 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_analytics](https://pub.dev/packages/firebase_analytics/versions/11.4.5) | 11.4.5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_app_check](https://pub.dev/packages/firebase_app_check/versions/0.3.2+5) | 0.3.2+5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_app_installations](https://pub.dev/packages/firebase_app_installations/versions/0.3.2+5) | 0.3.2+5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_auth](https://pub.dev/packages/firebase_auth/versions/5.5.3) | 5.5.3 | >=3.2.0 <4.0.0 | >=3.16.0 |
| [firebase_core](https://pub.dev/packages/firebase_core/versions/3.13.0) | 3.13.0 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_crashlytics](https://pub.dev/packages/firebase_crashlytics/versions/4.3.5) | 4.3.5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_data_connect](https://pub.dev/packages/firebase_data_connect/versions/0.1.4+1) | 0.1.4+1 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_database](https://pub.dev/packages/firebase_database/versions/11.3.5) | 11.3.5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_dynamic_links](https://pub.dev/packages/firebase_dynamic_links/versions/6.1.5) | 6.1.5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_in_app_messaging](https://pub.dev/packages/firebase_in_app_messaging/versions/0.8.1+5) | 0.8.1+5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_messaging](https://pub.dev/packages/firebase_messaging/versions/15.2.5) | 15.2.5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_ml_model_downloader](https://pub.dev/packages/firebase_ml_model_downloader/versions/0.3.3+3) | 0.3.3+3 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_performance](https://pub.dev/packages/firebase_performance/versions/0.10.1+5) | 0.10.1+5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_remote_config](https://pub.dev/packages/firebase_remote_config/versions/5.4.3) | 5.4.3 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_storage](https://pub.dev/packages/firebase_storage/versions/12.4.5) | 12.4.5 | >=3.2.0 <4.0.0 | >=3.3.0 |
| [firebase_vertexai](https://pub.dev/packages/firebase_vertexai/versions/1.6.0) | 1.6.0 | >=3.2.0 <4.0.0 | >=3.16.0 |


## [Flutter BoM 3.9.0 (2025-03-31)](https://github.com/firebase/flutterfire/blob/main/CHANGELOG.md#2025-03-31)

Install this version using FlutterFire CLI
Expand Down
8 changes: 4 additions & 4 deletions docs/cloud-messaging/receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,13 @@ At this point, everything should still be running normally. The final step is in
```objc
#import "NotificationService.h"
#import "FirebaseMessaging.h"
#import "FirebaseAuth.h" // Add this line if you are using FirebaseAuth phone authentication
#import <FirebaseAuth/FirebaseAuth-Swift.h> // Add this line if you are using FirebaseAuth phone authentication
#import <UIKit/UIKit.h> // Add this line if you are using FirebaseAuth phone authentication

@interface NotificationService ()
@interface NotificationService () <NSURLSessionDelegate>

@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver);
@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;
@property(nonatomic) void (^contentHandler)(UNNotificationContent *contentToDeliver);
@property(nonatomic) UNMutableNotificationContent *bestAttemptContent;

@end

Expand Down
5 changes: 5 additions & 0 deletions packages/cloud_firestore/cloud_firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 5.6.7

- **FIX**(firestore): Change asserts to throw argumentError ([#17302](https://github.com/firebase/flutterfire/issues/17302)). ([ec1e6a5e](https://github.com/firebase/flutterfire/commit/ec1e6a5eef149680b2750900d1f16d8074e09b38))
- **FIX**(cloud_firestore): correct nanoseconds calculation for pre-1970 dates ([#17195](https://github.com/firebase/flutterfire/issues/17195)). ([a13deae3](https://github.com/firebase/flutterfire/commit/a13deae3334045fb1a48817ff9300cbe0696d177))

## 5.6.6

- Update a dependency to the latest release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=3.2.0 <4.0.0'

dependencies:
cloud_firestore: ^5.6.6
cloud_firestore: ^5.6.7
firebase_core: ^3.13.0
flutter:
sdk: flutter
Expand Down
6 changes: 3 additions & 3 deletions packages/cloud_firestore/cloud_firestore/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description:
live synchronization and offline support on Android and iOS.
homepage: https://firebase.google.com/docs/firestore
repository: https://github.com/firebase/flutterfire/tree/main/packages/cloud_firestore/cloud_firestore
version: 5.6.6
version: 5.6.7
topics:
- firebase
- firestore
Expand All @@ -20,8 +20,8 @@ environment:
flutter: '>=3.3.0'

dependencies:
cloud_firestore_platform_interface: ^6.6.6
cloud_firestore_web: ^4.4.6
cloud_firestore_platform_interface: ^6.6.7
cloud_firestore_web: ^4.4.7
collection: ^1.0.0
firebase_core: ^3.13.0
firebase_core_platform_interface: ^5.4.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.6.7

- **FIX**(cloud_firestore): correct nanoseconds calculation for pre-1970 dates ([#17195](https://github.com/firebase/flutterfire/issues/17195)). ([a13deae3](https://github.com/firebase/flutterfire/commit/a13deae3334045fb1a48817ff9300cbe0696d177))

## 6.6.6

- Update a dependency to the latest release.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cloud_firestore_platform_interface
description: A common platform interface for the cloud_firestore plugin.
version: 6.6.6
version: 6.6.7
homepage: https://github.com/firebase/flutterfire/tree/main/packages/cloud_firestore/cloud_firestore_platform_interface
repository: https://github.com/firebase/flutterfire/tree/main/packages/cloud_firestore/cloud_firestore_platform_interface

Expand Down
4 changes: 4 additions & 0 deletions packages/cloud_firestore/cloud_firestore_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.4.7

- Update a dependency to the latest release.

## 4.4.6

- Update a dependency to the latest release.
Expand Down
Loading
Loading