这是indexloc提供的服务,不要输入任何密码
Skip to content

Non-sendable type Query / CollectionReference cause warnings in any actor-isolated context  #12666

@SwiftfulThinking

Description

@SwiftfulThinking

Description

Any time I try to use Firestore in an actor-isolated context (ie. within an Actor or a class on the MainActor), there are warnings that Non-sendable type... cannot cross actor boundary. This applies to Query and CollectionReference. Is there an approach to avoid this or can these classes become Sendable?

Notes:

  • These warnings appear after setting Strict Concurrency Checking to Complete.
  • I wasn't sure whether to label this as a bug and I couldn't find anything in the documentation explaining how to avoid this.

Reproducing the issue

Screenshot 2024-03-29 at 7 40 24 PM

Firebase SDK Version

10.23.0

Xcode Version

15.3

Installation Method

Swift Package Manager

Firebase Product(s)

Firestore

Targeted Platforms

iOS

Relevant Log Output

No response

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

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions