Skip to content

[camera] Regenerate iOS example with Swift#11283

Open
stuartmorgan-g wants to merge 10 commits intoflutter:mainfrom
stuartmorgan-g:swift-example-camera
Open

[camera] Regenerate iOS example with Swift#11283
stuartmorgan-g wants to merge 10 commits intoflutter:mainfrom
stuartmorgan-g:swift-example-camera

Conversation

@stuartmorgan-g
Copy link
Collaborator

Updates the iOS example app for camera_avfoundation to a Swift app. Rather than edit in place, this replaces the example app with a fresh copy to minimize drift from current template:

  • The existing ios/ directory was deleted
  • A new copy was created with flutter create --platforms=ios --org=dev.flutter .
  • The RunnerTest code was restored (other than unused files; see [camera_avfoundation] Remove unused Objective-C testing files #11240), and the placeholder file removed.
  • The important Info.plist entries were restored.
  • The special logic to bypass app launch plugin registration during unit tests was moved from main.m, which no longer exists, to the delegate callback where registration would be done.

I also did some minor test file cleanup I noticed while validating everything in Xcode again:

  • Remove some stale references to and usage of the FLT prefix (missed during Swift migrations).
  • Added some missing headers that local compilation complained about.

This is part of an overall modernization of the example apps; most packages have already been converted to Swift examples.

Pre-Review Checklist

Footnotes

  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. 2

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the iOS example app for camera_avfoundation to Swift, modernizing the example apps. The changes include replacing the existing Objective-C app with a fresh Swift copy, restoring RunnerTest code, updating Info.plist entries, and moving app launch plugin registration logic. Additionally, some minor test file cleanup was performed, such as removing stale references and adding missing headers. The review focuses on ensuring the correctness of the changes, particularly the migration to Swift and the restoration of testing functionality.


@testable import camera_avfoundation

/// Tests of `CameraPlugin` methods delegating to `FLTCam` instance

Choose a reason for hiding this comment

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

medium

The comment refers to FLTCam which no longer exists. Update the comment to reflect the current architecture using Camera.

Suggested change
/// Tests of `CameraPlugin` methods delegating to `FLTCam` instance
/// Tests of `CameraPlugin` methods delegating to `Camera` instance

@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants