firebase / firebase/firebase-ios-sdk

FirebaseDataEncoder that encode Data when calling to encode, returns Any instead of Data

Open
#14,045 6 comments 0 reactions 1 assignee Claimed by @milaGGL View on GitHub
api: firestore
Dominant language
C++
Stars
6.7k
Forks
1.8k
Avg merge
2d 14h
Merged PRs (30d)
72

Description

### Description

Seems like there's a bug in the sign of FirebaseDataEncoder encoder method
```open func encode(_ value: T) throws -> Any {```
that should be
```open func encode(_ value: T) throws -> Data {```

because it encodes data.

Any cannot be sendable whereas Data it is.

Thanks for your time.

### Reproducing the issue

_No response_

### Firebase SDK Version

11.3

### Xcode Version

16.1

### Installation Method

Swift Package Manager

### Firebase Product(s)

Firestore, Functions

### Targeted Platforms

iOS

### Relevant Log Output

_No response_

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

_No response_

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

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.