Update Roadmap (#12373)

This commit is contained in:
Paul Beusterien authored and GitHub committed 2024-02-07 15:23:36 -08:00
1 parent 0bb0dcf76c
commit 3ff2b270eb
2 files changed
+1 -173

No files matched your search

+1 -103
View File
@@ -11,109 +11,7 @@ contributing to the Firebase iOS SDK.
## Modernization - More Swifty
As we go into 2022, it's a top priority for the Firebase team to improve
usability and functionality for Swift developers. We welcome the community's
input and contribution as we work through this.
See the [Project Dashboard](SwiftDashboard.md).
Please upvote existing feature requests, add new feature requests, and send PRs.
* [Example Feature Request](https://github.com/firebase/firebase-ios-sdk/issues/8827)
* [Example Pull Request](https://github.com/firebase/firebase-ios-sdk/pull/6568)
See [Contributing.md](Contributing.md) for full details about contributing
code to the Firebase repo.
Thanks in large part to community contributions, we already have several Swift
improvements:
* Analytics
* Enabling [SwiftUI Screen tracking](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseAnalyticsSwift/CHANGELOG.md)
automated view logging for SwiftUI apps
* Firestore and RTDB
* Codable Support ([Firestore](https://github.com/firebase/firebase-ios-sdk/pull/3198),
[Database](https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseDatabaseSwift/Sources/Codable))
eliminated manual data processing
* [Property wrappers](https://github.com/firebase/firebase-ios-sdk/pull/8408) for Firestore collections dramatically simplified client coding
* Storage
* Eliminated impossible states, provided new and improved async API usage via
[Result type](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/CHANGELOG.md)
and [async/await](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/CHANGELOG.md)
additions
* ML Model Downloader
* Full [SDK implementation in Swift](https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseMLModelDownloader/Sources)
* In App Messaging
* Vastly simplified usage from SwiftUI with
[SwiftUI modifiers](https://github.com/firebase/firebase-ios-sdk/pull/7496) to show messages and
[preview helpers](https://github.com/firebase/firebase-ios-sdk/pull/8351)
### Phase 1 - Address Low Hanging Fruit for all Firebase Products
* Swift API tests
* async/await API evaluation, tests, and augmentation
* Fix non-Swifty APIs
* Fill API gaps
* Better Swift Error Handling
* Property Wrappers (Not necessarily low hanging, but can be high value)
* Identify larger projects for future phases
### APIs
Continue to evolve the Firebase API surface to be more
Swift-friendly. This is generally done with Swift specific extension libraries.
[FirebaseFirestoreSwift](Firestore/Swift) is a larger library that adds
Codable support for Firestore.
Add more such APIs to improve the Firebase Swift API.
More examples in the
[feature requests](https://github.com/firebase/firebase-ios-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22Swift+API%22).
### SwiftUI
Firebase should be better integrated with SwiftUI apps. See SwiftUI related
[issues](https://github.com/firebase/firebase-ios-sdk/issues?q=is%3Aissue+is%3Aopen++label%3ASwiftUI).
### Swift Async/Await
Evaluate impact on Firebase APIs of the
[Swift Async/await proposal](https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md).
For example, Objective-C callback APIs that return a value do not get an
async/await API automatically generated and an explicit function may need to be
added. See these
[Firebase Storage examples](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/Sources/AsyncAwait.swift).
### Combine
Firebase has community support for Combine (Thanks!). See
[Combine Readme](FirebaseCombineSwift/README.md) for usage and project details.
## More complete Apple platform support
Continue to expand the range and quality of Firebase support across
all Apple platforms.
Expand the
[current non-iOS platform support](README.md#community-supported-efforts)
from community supported to officially supported.
Fill in the missing pieces of the support matrix, which is
primarily *watchOS* for several libraries.
## Getting Started
### Quickstarts
Modernize the [Swift Quickstarts](https://github.com/firebase/quickstart-ios).
Continue the work done in 2020 and 2021 that used better Swift style, SwiftUI,
Swift Package Manager, async/await APIs, and multi-platform support for
[Analytics](https://github.com/firebase/quickstart-ios/tree/master/analytics),
[ABTesting](https://github.com/firebase/quickstart-ios/tree/master/abtesting),
[Auth](https://github.com/firebase/quickstart-ios/tree/master/authentication),
[Database](https://github.com/firebase/quickstart-ios/tree/master/database),
[Functions](https://github.com/firebase/quickstart-ios/tree/master/functions),
[Performance](https://github.com/firebase/quickstart-ios/tree/master/performance),
and
[RemoteConfig](https://github.com/firebase/quickstart-ios/tree/master/config).
We're continuing a long term journey to migrate from Objective-C to Swift.
## Product Improvements
-70
View File
@@ -1,70 +0,0 @@
# Firebase Swift Modernization Dashboard
This dashboard summarizes the status of Firebase's [2022 Swift Modernization Project](ROADMAP.md).
Please upvote or create a [feature request](https://github.com/firebase/firebase-ios-sdk/issues)
to help prioritize any particular cell(s).
This dashboard is intended to track an initial full Swift review of Firebase along with addressing low-hanging fruit. We would expect it to identify additional follow up
tasks for additional Swift improvements.
| | An | ApC | ApD | Aut | Cor | Crs | DB | DL | Fst | Fn | IAM | Ins | Msg | MLM | Prf | RC | Str |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| **Swift Library** | ✅ | ❌ |❌ | ❌ | n/a | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ |
| **Single Module** | ❌ | ✅ |✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| **API Tests** | ✅ | ✅ |❌ | ✅ | ✅ | ❌ | ✅ | ❌ | 1 | ✅ | 1 | ✅ | ✅ | 1 | ❌ | ✅ | ✅ |
| **async/await** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| **Swift Errors** | ✅ | ✅ | ✅ | 2 | ✅ | 5 | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | 3 |
| **Codable** | n/a | n/a | n/a | n/a | n/a | n/a | ✅ | n/a | ✅ | ✅ | n/a | n/a | n/a | n/a | n/a | ✅ | n/a |
| **SwiftUI Lifecycle** | ❌ | n/a | n/a | ❌ | n/a | n/a | n/a | ❌ | n/a | n/a | n/a | n/a | ❌ | n/a | ❌ | n/a | n/a |
| **SwiftUI Interop** | ✅ | n/a | ❌ | ❌ | n/a | ❌ | ❌ | n/a | ✅ | n/a | ✅ | n/a | n/a | n/a | ❌ | n/a | n/a |
| **Property Wrappers** | n/a | n/a | n/a | ❌ | n/a | n/a | ❌ | n/a | 4 | n/a | n/a | n/a | n/a | n/a | n/a | ✅ | n/a |
| **Swift Doc Scrub** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅|
### Other Projects
- Tooling to surface full list of automatically generated Swift API from Objective-C and validate.
- Improve singleton naming scheme. Move singletons into a Firebase namespace, like `Firebase.auth()`, `Firebase.storage()`, etc.
- Swift Generics. Update APIs that are using weakly typed information to use proper generics.
## Notes
1. Tests exist. Coverage to be confirmed.
2. `NS_ERROR_ENUM` used but a larger audit is still needed for more localized errors.
3. Still needs to unify Objective-C and Swift errors.
4. One property wrapper added in [#8614](https://github.com/firebase/firebase-ios-sdk/pull/8614). More to go.
5. `record(Error)` API should be expanded to collect Swift Errors as well as NSErrors.
## Rows (Swift Capabilities)
* **Swift Library**: SDK includes public APIs written in Swift, either in the main product library or a Swift-specific extension.
* **Single Module**: Public API surface in a single module.
* **API Tests**: Tests exist for all Swift APIs. Integration tests are preferred, but compile-only tests are acceptable.
* **async/await**:API tests include tests for all auto-generated async/await APIs. Implementations are added for
asynchronous APIs that don't have auto-generated counterparts like
[these](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift)
for Storage.
* **Swift Errors**: Swift Error Codes are available instead of NSErrors.
* **Codable**: Codable is implemented where appropriate.
* **SwiftUI Lifecycle**: Dependencies on the AppDelegate Lifecycle are migrated to the Multicast AppDelegate.
* **SwiftUI Interop**: Update APIs that include UIViewControllers (or implementations that depend on them) to work with SwiftUI. This will overlap with
Property Wrappers and likely the SwiftUI lifecycle bits, but an audit and improvements could likely be made. The existing FIAM and Analytics View modifier
APIs would fit into this category.
* **Property Wrappers**: Property wrappers are used to improve the API.
* **Swift Doc Scrub**: Review and update to change Objective-C types and call examples to Swift. In addition to updating the documentation content, we
should also investigate using DocC to format the docs.
## Columns (Firebase Products)
* An - Analytics
* ApC - App Check
* ApD - App Distribution
* Aut - Auth
* Cor - Core
* Crs - Crashlytics
* DB - Real-time Database
* DL - Dynamic Links
* Fst - Firestore
* Fn - Functions
* IAM - In App Messaging
* Ins - Installations
* Msg - Messaging
* MLM - MLModel Downloader
* Prf - Performance
* RC - Remote Config
* Str - Storage