Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.10.1+1

* Fixes Swift 6 Sendability warning in `CaptureDevice` protocol by annotating
the `setExposureTargetBias` completion handler as `@Sendable`.

## 0.10.1

* Fixes fatal crash on iPhone 17 when using `ResolutionPreset.max`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protocol CaptureDevice: NSObjectProtocol {
var minExposureTargetBias: Float { get }
var maxExposureTargetBias: Float { get }
func setExposureTargetBias(
_ bias: Float, completionHandler handler: ((CMTime) -> Void)?)
_ bias: Float, completionHandler handler: (@Sendable (CMTime) -> Void)?)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change to the protocol requirement will cause a compilation error in MockCaptureDevice.swift (and any other implementations of this protocol) because the method signature must match the protocol requirement exactly, including the @Sendable attribute. The PR description's claim that mocks are not affected is incorrect; they must be updated to include @Sendable in both the method signature and the setExposureTargetBiasStub property type to maintain protocol conformance.

func isExposureModeSupported(_ mode: AVCaptureDevice.ExposureMode) -> Bool

// Zoom
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_avfoundation
description: iOS implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.10.1
version: 0.10.1+1

environment:
sdk: ^3.9.0
Expand Down