Repository: firebase/firebase-ios-sdk (language: cpp)

Issue:
ServerTimestamp<T> could be sendable if T is Sendable
### Description

ServerTimestamp is not sendable, while T generic parameter like Date could be sendable.

### Reproducing the issue

_No response_

### Firebase SDK Version

11.2.0

### Xcode Version

16.1

### Installation Method

Swift Package Manager

### Firebase Product(s)

Firestore

### Targeted Platforms

iOS

### Relevant Log Output

```shell
.
```


### If using Swift Package Manager, the project's Package.resolved

_No response_

### If using CocoaPods, the project's Podfile.lock

_No response_


Discussion / hints:
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @jesus-mg-ios, thank you for raising this issue. Could you please provide more details on it?
Sure,  imagine that you got a variable  `var serverTimestamp: ServerTimestamp<Date>` to decode a response using Firestore, then ServerTimestamp is marked as Non Sendable ...

So it would be nice, that if Date, (that it is ) is sendable, then ServerTimestamp could be Sendable 

Something like this `extension ServerTimestamp: Sendable where T: Sendable {}` Because in this case ServerTimestamp can be Sendable if T it is. @milaGGL 
Hi @jesus-mg-ios, improving Sendable conformance in the SDK is certainly on our radar, but it is deprioritized for now. I've added your request to our backlog so we can consider it for future development. Googlers please see b/378477431.

Thank you again for bringing this to our attention. I'll close the issue for now and will update it if there are any changes.
Reopening since we are investigating better Swift Concurrency support across Firebase and we can consider this request in that effort.

Fix patch:
diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md
index 5781296165b..61c08250d85 100644
--- a/Firestore/CHANGELOG.md
+++ b/Firestore/CHANGELOG.md
@@ -1,3 +1,7 @@
+# Unreleased
+- [fixed] Add conditional `Sendable` conformance so `ServerTimestamp<T>` is
+  `Sendable` if `T` is `Sendable`. (#14042)
+
 # 11.4.0
 - [changed] Prepare Firestore cache to support session token.
 
diff --git a/Firestore/Swift/Source/Codable/ServerTimestamp.swift b/Firestore/Swift/Source/Codable/ServerTimestamp.swift
index fe6bbd696db..753878c16d5 100644
--- a/Firestore/Swift/Source/Codable/ServerTimestamp.swift
+++ b/Firestore/Swift/Source/Codable/ServerTimestamp.swift
@@ -105,3 +105,5 @@ public struct ServerTimestamp<Value>: Codable
 extension ServerTimestamp: Equatable where Value: Equatable {}
 
 extension ServerTimestamp: Hashable where Value: Hashable {}
+
+extension ServerTimestamp: Sendable where Value: Sendable {}


Test patch: