-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add new target FirebaseSharedSwift #8853
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
Add new target FirebaseSharedSwift #8853
Conversation
|
Please fix the swiftformat issues. I created a |
|
Thanks @paulb777 , |
| @@ -0,0 +1,23 @@ | |||
| /* | |||
| * Copyright 2020 Google LLC | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021
| ] | ||
| ), | ||
| .testTarget( | ||
| name: "FirebaseSharedSwiftTests", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests should be run in GitHub Actions. Likely a scheme needs to be added to https://github.com/firebase/firebase-ios-sdk/tree/master/scripts/spm_test_schemes. See also https://github.com/firebase/firebase-ios-sdk#swift-package-manager-1
…s I can't find Xcodes location for my shared scheme when using a custom workspace with the firebase-ios-sdk added as a local package.
|
I'm going to merge this PR to the codable-refactor branch to make the Functions Codable PR more manageable and to set up CI and CocoaPods for FirebaseSharedSwift |
| using encoder: Database.Encoder = .init()) -> [String: Any] { | ||
| do { | ||
| let enc = try encoder.encode(subject) | ||
| XCTAssertEqual(enc as? NSDictionary, expected as NSDictionary, file: file, line: line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why an NSDictionary versus a Dictionary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to leverage the obj-c definition of equatability from NSDictionary since [String: Any] is not equatable.
As discussed in issue #8528 I am starting this work by moving
Database.EncoderandDatabase.Decoderto a shared framework,FirebaseSharedSwift(should it be FirebaseSwiftShared? something else?) and rebranding asStructureEncoderandStructureDecoderwhile adding typealiases to keep API compatibility.