[ML] Deprecate FirebaseMlModelDownloader (#16357)

This commit is contained in:
Paul Beusterien authored and GitHub committed 2026-07-07 09:17:54 -07:00
1 parent 3255941960
commit e964ae4e93
7 files changed
+37 -2

No files matched your search

+2 -1
View File
@@ -39,6 +39,7 @@ jobs:
uses: ./.github/workflows/_cocoapods.yml
with:
product: FirebaseMLModelDownloader
allow_warnings: true
setup_command: |
mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/MLModelDownloader/GoogleService-Info.plist.gpg \
@@ -53,7 +54,7 @@ jobs:
with:
product: FirebaseMLModelDownloader
platforms: '[ "ios", "tvos", "macos" ]'
flags: '[ "--use-static-frameworks" ]'
flags: '[ "--use-static-frameworks --allow-warnings" ]'
setup_command: |
scripts/configure_test_keychain.sh
mkdir FirebaseMLModelDownloader/Tests/Integration/Resources
+1
View File
@@ -2,6 +2,7 @@ Pod::Spec.new do |s|
s.name = 'FirebaseMLModelDownloader'
s.version = '12.16.0-beta'
s.summary = 'Firebase ML Model Downloader'
s.deprecated = true
s.description = <<-DESC
This is the new ML Model Downloader CocoaPod.
+3
View File
@@ -1,2 +1,5 @@
# Unreleased
- [deprecated] Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage.
# 12.8.0
- [fixed] Remove unused legacy telemetry along with the large swift-protobuf dependency.
@@ -15,6 +15,11 @@
import Foundation
/// A custom model that is stored remotely on the server and downloaded to the device.
@available(
*,
deprecated,
message: "Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage"
)
public struct CustomModel: Hashable {
/// Name of the model.
public let name: String
@@ -15,6 +15,11 @@
import Foundation
/// Model download conditions.
@available(
*,
deprecated,
message: "Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage"
)
public struct ModelDownloadConditions {
let allowsCellularAccess: Bool
@@ -22,6 +22,11 @@ import Foundation
#endif // SWIFT_PACKAGE
/// Possible ways to get a custom model.
@available(
*,
deprecated,
message: "Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage"
)
public enum ModelDownloadType {
/// Get local model stored on device if available. If no local model on device, this is the same
/// as `latestModel`.
@@ -35,6 +40,11 @@ public enum ModelDownloadType {
}
/// Downloader to manage custom model downloads.
@available(
*,
deprecated,
message: "Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage"
)
public class ModelDownloader {
/// Name of the app associated with this instance of ModelDownloader.
private let appName: String
@@ -504,6 +514,11 @@ extension ModelDownloader {
}
/// Possible errors with model downloading.
@available(
*,
deprecated,
message: "Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage"
)
public enum DownloadError: Error, Equatable {
/// No model with this name exists on server.
case notFound
@@ -524,6 +539,11 @@ public enum DownloadError: Error, Equatable {
}
/// Possible errors with locating a model file on device.
@available(
*,
deprecated,
message: "Firebase ML is deprecated and will be shut down on June 15, 2027. To host custom models, you must migrate to another solution. You can use Cloud Storage for Firebase as an alternative for hosting custom models. For more info, see https://firebase.google.com/docs/ml/migrate-to-cloud-storage"
)
public enum DownloadedModelError: Error {
/// No model with this name exists on device.
case notFound
@@ -51,7 +51,7 @@ public let shared = Manifest(
Pod("FirebaseMessaging", zip: true),
Pod("FirebasePerformance", platforms: ["ios", "tvos"], zip: true),
Pod("FirebaseStorage", zip: true),
Pod("FirebaseMLModelDownloader", isBeta: true, zip: true),
Pod("FirebaseMLModelDownloader", isBeta: true, allowWarnings: true, zip: true),
Pod("Firebase", allowWarnings: true, platforms: ["ios", "tvos", "macos"], zip: true),
Pod("FirebaseCombineSwift", releasing: false, zip: false),
]