Skip to content

[in_app_purchase] Convert example app to Swift - #13556

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
stuartmorgan:iap-swift-example
Nov 4, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
stuartmorgan:iap-swift-example

Conversation

@stuartmorgan

Copy link
Copy Markdown
Contributor

Replaces the Obj-C boilerplate example app's app delegate and main.m with a Swift app delegate using the @main annotation, following the standard Swift Flutter example app format, and migrates the test-specific handling into the new file.

Part of flutter/flutter#119106

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

Replaces the Obj-C boilerplate example app's app delegate and main.m
with a Swift app delegate using the `@main` annotation, following the
standard Swift Flutter example app format, and migrates the
test-specific handling into the new file.

Part of flutter/flutter#119106
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the test-exempt label. All reviewers should feel empowered to ask for tests before escalating.

@stuartmorgan stuartmorgan added the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Nov 4, 2026

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

Copy link
Copy Markdown
Contributor

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 migrates the iOS runner example application for the in_app_purchase_storekit package from Objective-C to Swift, replacing AppDelegate.m and main.m with AppDelegate.swift and updating the Xcode project configuration. A critical issue was identified in AppDelegate.swift where NSClassFromString("XCTest.XCTestCase") is used; since XCTestCase is an Objective-C class, this lookup will return nil, failing to skip plugin registration during unit tests. It is recommended to use NSClassFromString("XCTestCase") instead.

@stuartmorgan

Copy link
Copy Markdown
Contributor Author

Originally I was going to migrate Stubs.m as well, but that code is pretty sketchy and looks like it's all part of SK1, so I left it alone since none of the SK1 implementation is being migrated either.

@jmagman jmagman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2026
@auto-submit

auto-submit Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/13556, because - This pull request has the missing-tests label and does not have the test-exempt label. Please add tests or obtain a test exemption from a tech lead before re-applying the autosubmit label.

@jmagman

jmagman commented Nov 4, 2026

Copy link
Copy Markdown
Member

Test exemption: refactor with no semantic change

@jmagman jmagman added test-exempt Exempt from tests. Overrides `missing-tests` label autosubmit Merge PR when tree becomes green via auto submit App labels Nov 4, 2026
@auto-submit
auto-submit Bot merged commit f7c47a2 into flutter:main Nov 4, 2026
13 checks passed
bkonyi pushed a commit to bkonyi/flutter that referenced this pull request Nov 5, 2026
flutter/packages@670b30e...0478162

2026-11-05 [email protected] [material_ui] Document RefreshIndicator mouse
behavior on desktop and web (flutter/packages#13286)
2026-11-05 [email protected] [material_ui] Make
SearchAnchor.bar respect SearchBarThemeData padding
(flutter/packages#13360)
2026-11-04 [email protected] [pointer_interceptor] Use
dart.library.js_interop in example export (flutter/packages#13558)
2026-11-04 [email protected] [in_app_purchase_storekit] Use
purchase(confirmIn:) for StoreKit 2 purchases (flutter/packages#13410)
2026-11-04 [email protected] [material_ui] Fix
dismissal near minimum extent when shouldCloseOnMinExtent
(flutter/packages#12545)
2026-11-04 [email protected] [material_ui]
Add Material 3 Expressive `ElevatedButton` (flutter/packages#13084)
2026-11-04 [email protected] [go_router]
Stop inactive StatefulShellRoute branches from vetoing pops
(flutter/packages#12972)
2026-11-04 [email protected] Manual roll Flutter (stable)
from abaf9c5 to c197ca5 (14 revisions)
(flutter/packages#13542)
2026-11-04 [email protected] [in_app_purchase] Convert example app
to Swift (flutter/packages#13556)
2026-11-04 [email protected] Sync release-go_router-18.1.3 to
main (flutter/packages#13559)
2026-11-04 [email protected] Sync release-material_ui-1.10.0 to
main (flutter/packages#13546)
2026-11-04 [email protected]
[camera_android_camerax] Add magic number guideline to `TESTING.md`
(flutter/packages#13081)
2026-11-04 [email protected] Sync release-cupertino_ui-1.1.6 to
main (flutter/packages#13547)
2026-11-04 [email protected] [file_selector] Convert unit tests to
Kotlin (flutter/packages#13102)
2026-11-04 [email protected] Roll Flutter from
9347202 to 3623d2d (25 revisions) (flutter/packages#13555)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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 missing-tests override: no changelog needed Override the check requiring CHANGELOG updates for most changes p: in_app_purchase platform-ios platform-macos test-exempt Exempt from tests. Overrides `missing-tests` label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants