* [Firebase 10] Revamp FIRLogger for Swift use
* Fix test impl and only run firebasepod.yml
* re-enable actions
* Implement logger
* Global TAP
* Revert .pbxproj
* Call directly to GULs
* Review
* Undo API breaks
* [skip ci] Avoid NS_SWIFT_NAME due to macro collisions
This fixes the warning that broke the Auth x watchOS job.
* [skip ci] Revert Gemfile
* Firestore: Make @DocumentID value setter private
Updated the `DocumentID` Swift property wrapper's `value` property to be private(set) since it is ignored in the methods that write to Firestore.
* Make initializer private
* Fix formatting
* Fix tests
Made the setter internally accessible and imported FirebaseFirestoreSwift with @testable.
* Add a changelog entry and formatting fixes
* Documentation fixes
* [skip ci] Add runtime warnings to `@DocumentID` setter and initializer (#10275)
* [Firestore] Mark `@DocumentID` setter deprecated and add log statement in init
* Fix typo in import
* Update CHANGELOG
* Review and remove deprecation
* Review and add FIRLogWarningSwift
* Add FirebaseCorExtension to Firestore's Podfile
* [skip ci] Fix merged comment
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Nick Cooke <nickcooke@google.com>
Removed the `Firestore.Encoder` and `Firestore.Decoder` encoding/decoding strategy type aliases and directly used the types from `FirebaseDataEncoder` and `FirebaseDataDecoder`.
Note: This requires the `TimestampEncoding/DecodingStrategy` extension to be added to `FirebaseDataEncoder/Decoder` instead of `Firestore.Encoder` and `Firestore.Decoder`. This will make the `timestamp` strategy visible to all users of the `FirebaseDataEncoder/Decoder` (that have FirestoreSwift installed), even though `Timestamp` is a Firestore-specific type.
* Enable async/await APIs for iOS 13, etc.
This bumps the required compiler version to 5.5.2 which was included in
Xcode 13.2, where backporting was first introduced.
This breaks less developers and enables developers who aren't using
these APIs to still compile using Xcode 13.0 and 13.1.
As far as I can tell, the only breakage this includes now is developers
who are using Xcode 13.0 or 13.1, targeting iOS 15 and using one of
these 7 APIs. It will result in a compiler error and they'll have to
either use the completion handler version or upgrade to Xcode 13.2+ to
fix the compilation error.
* Missed checks, CHANGELOG
* Fixed avialability, added watchOS for RTDB
* Moved to watchOS 7 for all async/await APIs to match platform support
* Remove the extension that makes NSDate ServerTimestampWrappable.
This turns out not to actually work because NSDate does not conform to
Codable. Users can supply their own extensions that make NSDate conform
to Codable and also supply an extension like this one to make NSDate
conform to ServerTimestampWrappable.
Add a test that verifies ServerTimestamps of Dates actually work. The
equivalent test for NSDate does not compile.
* Fix minimum Swift version for FirebaseFirestoreSwift
FirebaseFirestoreSwift was already using synthesized Equatable and
Hashable conformance which requires Swift 4.1.
* Add conditional conformance to Hashable to Firestore property wrapper types
Mark these types as conforming to Hashable if the underlying type itself
conforms to hashable. This implementation relies on synthesized
Equatable and Hashable conformance that shipped as a part of Swift 4.1.
* Fix lint/style
* Changelog
This turns out not to actually work because NSDate does not conform to
Codable. Users can supply their own extensions that make NSDate conform
to Codable and also supply an extension like this one to make NSDate
conform to ServerTimestampWrappable.
Add a test that verifies ServerTimestamps of Dates actually work. The
equivalent test for NSDate does not compile.
* Rewrite SelfDocumentID as a property wrapper
Make wrapped types conform to DocumentReferenceConvertible and use that
protocol to implement the conversion.
* Change DocumentReferenceConvertible to DocumentIDWrappable
* Make ServerTimestampWrappable use static functions
Use the same form as DocumentIDWrappable.
* Update extension String: ServerTimestampWrappable
* Use #if compiler, not #if swift
The FirebaseFirestoreSwift module is declared as conforming to Swift
4.0 so #if swift is still false, even when compiling with Swift 5.1.
Using #if compiler will see the actual compiler version. Property
wrappers don't depend on runtime features, so this works.
Also, allow Wrappable protocols to throw during conversions.
* Move ServerTimestamp into its own file
* Rewrite ServerTimestamp as a property wrapper
Add Swift4ServerTimestamp that behaves as before.
* Make ServerTimestampWrappable dictate timestamp conversion.
This makes the @ServerTimestamp property wrapper completely open to
extension by end users too.
* Rewrite FirestoreEncoderTests using assertThat
* Throw invalidValue for use of invalid top-level values
* Provide an message for not supported errors
* working serverTimestamp
* working FieldValue. Still need: document ref and ability to Eq of FieldValue
* DocumentReference implemented and testing works
* clean up header search path
* improving FieldValue enum comments
* run through formatting
* addressing comments
* formatted with swiftformat 0.35.7
* add missing bool->BOOL change
* undo unintended swift version change
* remove unwanted proj file change
* Annotate Transaction and WriteBatch methods as discardable
These methods exist to allow chaining if that's useful but chaining
isn't expected or required.
Note that Objective-C methods in these types are implicitly
@discardableResult and don't need any extra help.
* No need to explicitly discard results
* Fix typos in FIRCollectionReference docs
* Add support for CollectionReference.addDocument(from:)
* working serverTimestamp
* working FieldValue. Still need: document ref and ability to Eq of FieldValue
* DocumentReference implemented and testing works
* clean up header search path
* improving FieldValue enum comments
* run through formatting
* addressing comments
* formatted with swiftformat 0.35.7
* add missing bool->BOOL change
* undo unintended swift version change
* remove unwanted proj file change