Skip to content

Commit 0a34f71

Browse files
[camera_avfoundation] Implementation swift migration - part 12 (#9781)
Migrates camera implementation as part of flutter/flutter#119109 This PR migrates the 9th chunk of `FLTCam` class to Swift: * `init` * Moves fields that no longer need to be accessible from `FLTCam` to `DefaultCamera` * Removes unused `textureId` field from `FLTCam` (it seems `cameraId` is used as "texture id" and this field wasn't used for a while now) * Typo correction in a comment so there is a bunch of files with just change in comment Some properties of the FLTCam have to be temporarily made public so that they are accessible in DefaultCamera. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent a3f09e5 commit 0a34f71

File tree

51 files changed

+206
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+206
-260
lines changed

packages/camera/camera_avfoundation/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
## NEXT
1+
## 0.9.21+2
22

3+
* Migrates `DefaultCamera` initialization to Swift.
4+
* Removes unused `textureId` field of `FLTCam` class.
35
* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
46

57
## 0.9.21+1

packages/camera/camera_avfoundation/example/ios/RunnerTests/AvailableCamerasTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import XCTest
77

88
@testable import camera_avfoundation
99

10-
// Import Objectice-C part of the implementation when SwiftPM is used.
10+
// Import Objective-C part of the implementation when SwiftPM is used.
1111
#if canImport(camera_avfoundation_objc)
1212
import camera_avfoundation_objc
1313
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraInitRaceConditionsTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import XCTest
66

77
@testable import camera_avfoundation
88

9-
// Import Objectice-C part of the implementation when SwiftPM is used.
9+
// Import Objective-C part of the implementation when SwiftPM is used.
1010
#if canImport(camera_avfoundation_objc)
1111
import camera_avfoundation_objc
1212
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraMethodChannelTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import XCTest
77

88
@testable import camera_avfoundation
99

10-
// Import Objectice-C part of the implementation when SwiftPM is used.
10+
// Import Objective-C part of the implementation when SwiftPM is used.
1111
#if canImport(camera_avfoundation_objc)
1212
import camera_avfoundation_objc
1313
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraOrientationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import XCTest
88

99
@testable import camera_avfoundation
1010

11-
// Import Objectice-C part of the implementation when SwiftPM is used.
11+
// Import Objective-C part of the implementation when SwiftPM is used.
1212
#if canImport(camera_avfoundation_objc)
1313
import camera_avfoundation_objc
1414
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraPermissionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import XCTest
77

88
@testable import camera_avfoundation
99

10-
// Import Objectice-C part of the implementation when SwiftPM is used.
10+
// Import Objective-C part of the implementation when SwiftPM is used.
1111
#if canImport(camera_avfoundation_objc)
1212
import camera_avfoundation_objc
1313
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraPluginCreateCameraTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import XCTest
66

77
@testable import camera_avfoundation
88

9-
// Import Objectice-C part of the implementation when SwiftPM is used.
9+
// Import Objective-C part of the implementation when SwiftPM is used.
1010
#if canImport(camera_avfoundation_objc)
1111
import camera_avfoundation_objc
1212
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraPluginDelegatingMethodTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import XCTest
66

77
@testable import camera_avfoundation
88

9-
// Import Objectice-C part of the implementation when SwiftPM is used.
9+
// Import Objective-C part of the implementation when SwiftPM is used.
1010
#if canImport(camera_avfoundation_objc)
1111
import camera_avfoundation_objc
1212
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraPluginInitializeCameraTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import XCTest
66

77
@testable import camera_avfoundation
88

9-
// Import Objectice-C part of the implementation when SwiftPM is used.
9+
// Import Objective-C part of the implementation when SwiftPM is used.
1010
#if canImport(camera_avfoundation_objc)
1111
import camera_avfoundation_objc
1212
#endif

packages/camera/camera_avfoundation/example/ios/RunnerTests/CameraPreviewPauseTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import XCTest
77

88
@testable import camera_avfoundation
99

10-
// Import Objectice-C part of the implementation when SwiftPM is used.
10+
// Import Objective-C part of the implementation when SwiftPM is used.
1111
#if canImport(camera_avfoundation_objc)
1212
import camera_avfoundation_objc
1313
#endif

0 commit comments

Comments
 (0)