firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Add `sending` to returned values from async Storage APIs

Open morganchen12 opened this issue 11 months ago • 2 comments

This allows returned values to be used in async contexts. Otherwise, the following example:

let root = Storage.storage().reference()

// Get metadata properties
do {
  let metadata = try await root.getMetadata()
} catch {
  // ...
}

Produces an error:

Non-sendable type 'StorageMetadata' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary

Annotating these values as sending requires no other conformance work since references to the returned values are not held by Storage. See the sending proposal for more details.

morganchen12 avatar Jan 08 '25 23:01 morganchen12

1 Warning
:warning: Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by :no_entry_sign: Danger

google-oss-bot avatar Jan 08 '25 23:01 google-oss-bot

Apple API Diff Report

Commit: 909266e5f88c2c6938169949f5679646a29c833c Last updated: Wed Jan 8 16:05 PST 2025 View workflow logs & download artifacts


[BUILD ERROR] FirebaseStorage


github-actions[bot] avatar Jan 08 '25 23:01 github-actions[bot]

Closed in favor of https://github.com/firebase/firebase-ios-sdk/pull/14763

morganchen12 avatar Apr 24 '25 23:04 morganchen12