Commit Graph
5 Commits
Author SHA1 Message Date
manjanac f6e61e36c1 Logical checkpoint of ModelDownloader implementation (#7259)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Includes the implementation of: 1) download types, 2) list models, 3) delete model.

* Add protocol to handle writing to user defaults.

* Add protocol to handle writing to user defaults.

* Add empty init to ModelDownloadConditions.

* Copyright year + other minor fixes.

* TODO to use FirebaseApp internal init for test app.

* Test if download progress is in range.

* Remove not nil test for progress.

* Remove not nil test for progress.
2021-01-07 14:54:12 -08:00
manjanac 1a1a91a225 Refactor modelInfo into localModelInfo and remoteModelInfo (#7163)
* Restores ML Pods after M77.

* Fix Package.swift

* Refactor model info to be in-memory.

* Add improved model download functionality w/ single set of download handlers per task.

* Rename model download to better match URLSessionTask.

* Rename model download to better match URLSessionTask.

* Update unit test to read/write to user defaults.

* Configure downloader with Firebase app.

* Minor updates to model downloader and tests.

* Singleton for model downloader instance, for default and custom app.

* Download types WIP - local model.

* Download types WIP.

* Manually add app lifecycle handling + TODOs for Firebase Components.

* Replace options with app name as a property in ModelDownloader.

* Download types WIP.

* Refactor model info.

* Add convenience inits + other minor fixes.

* Explicit enum for model info result.
2021-01-06 12:04:47 -08:00
manjanac e6b60202d4 Add singleton-ish instance methods for model downloader (public API). (#7124)
* Restores ML Pods after M77.

* Fix Package.swift

* Refactor model info to be in-memory.

* Add improved model download functionality w/ single set of download handlers per task.

* Rename model download to better match URLSessionTask.

* Rename model download to better match URLSessionTask.

* Update unit test to read/write to user defaults.

* Configure downloader with Firebase app.

* Minor updates to model downloader and tests.

* Singleton for model downloader instance, for default and custom app.

* Manually add app lifecycle handling + TODOs for Firebase Components.

* Replace options with app name as a property in ModelDownloader.

* Update unit test to check model downloader instance creation + minor rename.
2020-12-14 10:59:42 -08:00
manjanac dbdefc5163 Refactoring model download functionality. (#7068)
* Restores ML Pods after M77.

* Fix Package.swift

* Refactor model info to be in-memory.

* Add improved model download functionality w/ single set of download handlers per task.

* Rename model download to better match URLSessionTask.

* Rename model download to better match URLSessionTask.

* Update unit test to read/write to user defaults.

* Minor updates to model downloader and tests.

* Use caches directory for model storage on tvOS.

* Change modelInfo to be privately settable.
2020-12-04 15:57:16 -08:00
manjanac e15bb36a2f Add GoogleService-Info.plist for integration testing. (#7037)
* Restores ML Pods after M77.

* Fix Package.swift

* Add GoogleService-Info.plist to secrets for integration tests.

* Configure FirebaseApp in tests to read from GoogleService-Info.plist.

* Lint fix.

* Plist WIP

* Plist WIP

* Add GoogleService-Info.plist to secrets for (future) integration tests.

* Add GoogleService-Info.plist to secrets for (future) integration tests.

* Add GoogleService-Info.plist to secrets for (future) integration tests.

* Split tests into unit and integration, configure FirebaseApp.

* Move GoogleService-Info.plist to Integration/

* Split tests into unit and integration.

* Fix workflow step to copy plist over to project.
2020-11-30 17:55:22 -08:00