Skip to content

Commit d5b09de

Browse files
authored
[firestore] Mark readonly public classes as Sendable (#13453)
1 parent 6148c13 commit d5b09de

18 files changed

+51
-27
lines changed

Firestore/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Unreleased
2+
- [fixed] Marked all public classes with only readonly properties as `Sendable` to address
3+
Swift Concurrency Check warning. (#12666)
4+
15
# 11.1.0
26
- [feature] Add `VectorValue` type support.
37

Firestore/Source/Public/FirebaseFirestore/FIRAggregateField.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
2323
/**
2424
* Represents an aggregation that can be performed by Firestore.
2525
*/
26+
NS_SWIFT_SENDABLE
2627
NS_SWIFT_NAME(AggregateField)
2728
@interface FIRAggregateField : NSObject
2829

Firestore/Source/Public/FirebaseFirestore/FIRAggregateQuery.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
2626
/**
2727
* A query that calculates aggregations over an underlying query.
2828
*/
29+
NS_SWIFT_SENDABLE
2930
NS_SWIFT_NAME(AggregateQuery)
3031
@interface FIRAggregateQuery : NSObject
3132

Firestore/Source/Public/FirebaseFirestore/FIRAggregateQuerySnapshot.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
2424
/**
2525
* The results of executing an `AggregateQuery`.
2626
*/
27+
NS_SWIFT_SENDABLE
2728
NS_SWIFT_NAME(AggregateQuerySnapshot)
2829
@interface FIRAggregateQuerySnapshot : NSObject
2930

Firestore/Source/Public/FirebaseFirestore/FIRCollectionReference.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
2626
* A `CollectionReference` object can be used for adding documents, getting document references,
2727
* and querying for documents (using the methods inherited from `Query`).
2828
*/
29+
NS_SWIFT_SENDABLE
2930
NS_SWIFT_NAME(CollectionReference)
3031
@interface FIRCollectionReference : FIRQuery
3132

Firestore/Source/Public/FirebaseFirestore/FIRDocumentChange.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ typedef NS_ENUM(NSInteger, FIRDocumentChangeType)
4343
* A `DocumentChange` represents a change to the documents matching a query. It contains the
4444
* document affected and the type of change that occurred (added, modified, or removed).
4545
*/
46+
NS_SWIFT_SENDABLE
4647
NS_SWIFT_NAME(DocumentChange)
4748
@interface FIRDocumentChange : NSObject
4849

Firestore/Source/Public/FirebaseFirestore/FIRDocumentReference.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ typedef void (^FIRDocumentSnapshotBlock)(FIRDocumentSnapshot *_Nullable snapshot
3939
* may or may not exist. A `DocumentReference` can also be used to create a `CollectionReference` to
4040
* a subcollection.
4141
*/
42+
NS_SWIFT_SENDABLE
4243
NS_SWIFT_NAME(DocumentReference)
4344
@interface FIRDocumentReference : NSObject
4445

Firestore/Source/Public/FirebaseFirestore/FIRDocumentSnapshot.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ typedef NS_ENUM(NSInteger, FIRServerTimestampBehavior) {
5555
* For a `DocumentSnapshot` that points to a non-existing document, any data access will return
5656
* `nil`. You can use the `exists` property to explicitly verify a documents existence.
5757
*/
58+
NS_SWIFT_SENDABLE
5859
NS_SWIFT_NAME(DocumentSnapshot)
5960
@interface FIRDocumentSnapshot : NSObject
6061

Firestore/Source/Public/FirebaseFirestore/FIRFieldPath.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
2323
* (referring to a top level field in the document), or a list of field names (referring to a nested
2424
* field in the document).
2525
*/
26+
NS_SWIFT_SENDABLE
2627
NS_SWIFT_NAME(FieldPath)
2728
@interface FIRFieldPath : NSObject <NSCopying>
2829

Firestore/Source/Public/FirebaseFirestore/FIRFieldValue.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
2222
/**
2323
* Sentinel values that can be used when writing document fields with `setData()` or `updateData()`.
2424
*/
25+
NS_SWIFT_SENDABLE
2526
NS_SWIFT_NAME(FieldValue)
2627
@interface FIRFieldValue : NSObject
2728

0 commit comments

Comments
 (0)