Migrate iOS plugin to Swift Package Manager#7
Open
elitree wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the iOS plugin to a Swift Package Manager structure, updates the example app's iOS deployment target to 13.0, and integrates the new implicit Flutter engine delegate in the AppDelegate. Feedback recommends renaming the library in Package.swift to use underscores for consistency and uncommenting the platform version in the Podfile to match the project's deployment target.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Swift Package Manager support to the
open_mail_app_plusiOS plugin, following Flutter's standard dual-support pattern (the same layout first-party plugins likeurl_launcher_iosuse). The plugin now builds under both SPM and CocoaPods from a single shared set of source files.Plugin changes (
ios/)ios/open_mail_app_plus/Package.swiftdeclaring theopen_mail_app_plustarget (iOS 12 min) and bundlingPrivacyInfo.xcprivacyas a processed resource.ios/Classes/OpenMailAppPlusPlugin.swift→ios/open_mail_app_plus/Sources/open_mail_app_plus/OpenMailAppPlusPlugin.swiftios/Resources/PrivacyInfo.xcprivacy→ios/open_mail_app_plus/Sources/open_mail_app_plus/PrivacyInfo.xcprivacyopen_mail_app_plus.podspecto read the same relocated sources (source_files+resource_bundles), so CocoaPods and SPM share one source of truth — no duplicated code.OpenMailAppPlugin.h/.m). These were leftover template files referencing a non-existentOpenMailAppPluginclass (the.meven called itself recursively) and were never wired up —pubspec.yamlonly registersOpenMailAppPlusPlugin.Example app changes (
example/ios/)Podfile(+ generatedPodfile.lock). The project still carried CocoaPods build phases but had no Podfile, so${PODS_ROOT}resolved empty and the build failed withUnable to load contents of file list: '/Target Support Files/Pods-Runner/...'. With the Podfile back,pod installregenerates the xcfilelists and SPM + CocoaPods coexist as Flutter expects.Incidental (Flutter tooling auto-migrations)
Running the example under the current Flutter SDK triggered standard project migrations that are included in the diff:
AppDelegate.swiftadoptsFlutterImplicitEngineDelegatefor plugin registration.Info.plistgains theUIApplicationSceneManifest(FlutterSceneDelegate) entries.AppFrameworkInfo.plist/project.pbxproj/ scheme / lockfile updates.Testing
swift package describeresolves the manifest, target, and privacy resource cleanly.flutter runon an iOS simulator builds and launches the example successfully.Resolves #6 .