Skip to content

[camera] Regenerate iOS example with Swift#11283

Merged
auto-submit[bot] merged 10 commits intoflutter:mainfrom
stuartmorgan-g:swift-example-camera
Mar 25, 2026
Merged

[camera] Regenerate iOS example with Swift#11283
auto-submit[bot] merged 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 autosubmit Merge PR when tree becomes green via auto submit App and removed CICD Run CI/CD labels Mar 18, 2026
@auto-submit auto-submit bot merged commit b409f0f into flutter:main Mar 25, 2026
81 checks passed
@stuartmorgan-g stuartmorgan-g deleted the swift-example-camera branch March 25, 2026 12:59
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 25, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 25, 2026
flutter/packages@8dcfd11...5909bdd

2026-03-25 47866232+chunhtai@users.noreply.github.com [ci] add more
permissions for create-pull-request (flutter/packages#11302)
2026-03-25 stuartmorgan@google.com [various] Add
`unintended_html_in_doc_comment` to analysis options
(flutter/packages#11303)
2026-03-25 matt.boetger@gmail.com Use deprecated dependency until legacy
renderer is removed (flutter/packages#11185)
2026-03-25 louisehsu@google.com [in_app_purchase_storekit] Address flaky
tests (flutter/packages#11270)
2026-03-25 stuartmorgan@google.com [google_maps_flutter] Fix A2A iOS
builds (flutter/packages#11290)
2026-03-25 stuartmorgan@google.com [mustache_template] Fix broken README
link (flutter/packages#11306)
2026-03-25 stuartmorgan@google.com [ci] Add a workflow to auto-remove
CICD label (flutter/packages#11301)
2026-03-25 stuartmorgan@google.com [various] Convert plugin builds to
Kotlin gradle (flutter/packages#11172)
2026-03-25 spkhalad@gmail.com [webview_flutter_platform_interface] Add
support for getting cookie (flutter/packages#11037)
2026-03-25 stuartmorgan@google.com [cupertino_icons] Remove empty Dart
file (flutter/packages#11308)
2026-03-25 stuartmorgan@google.com [camera] Regenerate iOS example with
Swift (flutter/packages#11283)
2026-03-25 tarrinneal@gmail.com [pigeon] Optimize data class equality
and hashing in Dart, Kotlin, java, and Swift, adds equality in other
languages (flutter/packages#11140)
2026-03-25 katelovett@google.com [two_dimensional_scrollables] Fix span
border decorations in flipped cross axes (flutter/packages#11334)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: camera platform-ios platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants