Commit a1ddc6f
committed
[camera_avfoundation] Fix Swift 6 Sendability warning in CaptureDevice protocol
The `setExposureTargetBias` completion handler in the `CaptureDevice`
protocol was declared as `((CMTime) -> Void)?`, while the underlying
`AVCaptureDevice` conformance expects `(@sendable (CMTime) -> Void)?`.
This mismatch produces a warning under `SWIFT_STRICT_CONCURRENCY=targeted`
and is a hard error in Swift 6 language mode.
Adds `@Sendable` to the closure parameter in the protocol declaration to
match the AVFoundation signature.1 parent 8aa6c08 commit a1ddc6f
3 files changed
Lines changed: 7 additions & 2 deletions
File tree
- packages/camera/camera_avfoundation
- ios/camera_avfoundation/Sources/camera_avfoundation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | 7 | | |
3 | 8 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments