Skip to content

feat: migrate iOS/macOS plugins and examples to Swift Package Manager#358

Open
vicajilau wants to merge 4 commits intocrazecoder:masterfrom
vicajilau:feat/spm-migration-ios-macos
Open

feat: migrate iOS/macOS plugins and examples to Swift Package Manager#358
vicajilau wants to merge 4 commits intocrazecoder:masterfrom
vicajilau:feat/spm-migration-ios-macos

Conversation

@vicajilau
Copy link
Copy Markdown
Contributor

@vicajilau vicajilau commented Apr 21, 2026

Summary

This PR migrates the iOS/macOS plugin stack and example projects to a coherent Swift Package Manager (SPM) setup, and also includes repository cleanup to remove generated noise and stale CocoaPods artifacts.

Closes #355

Why merge this

  • Resolves an inconsistent hybrid state (SPM partially enabled while CocoaPods hooks still existed in iOS/macOS examples).
  • Removes brittle Pod-related checks and references that caused intermittent build failures.
  • Aligns plugin authoring layout with current Flutter SPM guidance.
  • Improves repository hygiene by ignoring SPM build caches and removing tracked machine/generated files that should not live in git.
  • Verified with successful iOS/macOS example builds after migration.

Main functional changes

  1. Plugin SPM authoring updates
  • Added Package.swift at the correct location.
  • Removed misplaced open_file_ios/ios/open_file_ios/Sources/Package.swift.
  • Updated Package.swift to use FlutterFramework and macOS 10.15 baseline.
  1. Environment constraints for SPM-era Flutter tooling
  • Updated pubspec.yaml and pubspec.yaml:
    • sdk: ^3.11.0
    • flutter: ">=3.41.0"
  1. iOS example de-integration from CocoaPods remnants
  • Deleted open_file_ios/example/ios/Podfile and open_file_ios/example/ios/Podfile.lock.
  • Removed stale Pods refs/build phases/config ties from project.pbxproj.
  • Removed Pods/Pods.xcodeproj from contents.xcworkspacedata.
  1. macOS example workspace cleanup
  • Removed stale Pods/Pods.xcodeproj reference from contents.xcworkspacedata.

Repository cleanup included in this PR

  1. Git ignore hygiene
  • Updated /.gitignore with recursive SPM cache ignores:
    • **/.build/
    • **/.swiftpm/
  • Kept broader Flutter generated-file ignore coverage to reduce flutter pub get / build noise in a multi-package workspace.
  1. Tracked generated/local files cleanup
  • Removed tracked local CocoaPods files from iOS example (Podfile and Podfile.lock) as part of SPM migration.
  • Removed tracked misplaced SPM manifest under Sources/.
  • Previously cleaned local machine-specific file tracking policy (e.g. android local.properties in examples) is now consistent with ignore rules.
  1. Lockfile normalization due to dependency refresh
  • Updated:
    • pubspec.lock
    • pubspec.lock

iOS 13 note

  • iOS minimum target effectively moved to iOS 13 in the SPM path.
  • This came from Flutter migration behavior plus current SPM baseline guidance.
  • This PR prioritizes a consistent, working SPM-first flow for iOS/macOS plugin examples.

Validation performed

  • flutter pub get in platform packages.
  • flutter build ios --simulator --no-codesign in example.
  • flutter build macos in example.

Risk / rollback

  • Primary behavior change is iOS 13 baseline in the SPM flow.
  • If compatibility concerns arise, rollback is straightforward by reverting this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CocoaPods still used instead of SPM

1 participant