Skip to content

feat(ios): Swift Package Manager support and iOS 13 minimum#208

Draft
robert-northmind wants to merge 2 commits intomainfrom
cursor/ios-spm-dual-support-b018
Draft

feat(ios): Swift Package Manager support and iOS 13 minimum#208
robert-northmind wants to merge 2 commits intomainfrom
cursor/ios-spm-dual-support-b018

Conversation

@robert-northmind
Copy link
Copy Markdown
Collaborator

@robert-northmind robert-northmind commented Apr 10, 2026

Description

Adds Swift Package Manager support for the iOS plugin per Flutter’s plugin author guide, while keeping CocoaPods via an updated faro.podspec.

  • New ios/faro/Package.swift with FlutterFramework and Microsoft PLCrashReporter (CrashReporter product).
  • Swift sources moved from ios/Classes/ to ios/faro/Sources/faro/ (Flutter’s recommended layout).
  • iOS minimum deployment target: 13.0 in both podspec and SPM (aligned with the example app Podfile).
  • Removed stale vendored_frameworks / preserve_paths for a missing CrashReporter.xcframework; PLCrashReporter remains the CocoaPods dependency.
  • Raised pubspec.yaml environment to sdk: >=3.11.0 and flutter: >=3.41.0 (required for Flutter SPM FlutterFramework).
  • Example pubspec.yaml environment aligned with the package.
  • ios/.gitignore: .build/ and .swiftpm/.
  • Analyzer: removed deprecated avoid_null_checks_in_equality_operators and small lint-driven fixes so flutter analyze exits 0 on current stable (CI uses analyzer exit code).
  • Formatting: full-repo dart format applied so CI dart format --set-exit-if-changed . passes on stable.

Closes #189 when merged.

Related Issue(s)

Fixes #189

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — Raises minimum Flutter/Dart and iOS deployment target; apps must use Flutter ≥ 3.41 / Dart ≥ 3.11 and target iOS ≥ 13 for the plugin’s native side.

Checklist

  • Documentation updated (AGENTS.md path note; CHANGELOG.md under Unreleased)
  • Tests: flutter test passed locally; iOS SPM/CocoaPods builds should be verified on macOS (pod lib lint, flutter run with SPM enabled/disabled)
  • CHANGELOG.md updated

Additional Notes

  • Follow-up on macOS: run pod lib lint ios/faro.podspec and an Xcode build with flutter config --enable-swift-package-manager (and with it disabled) — not runnable in this Linux CI agent.
Open in Web Open in Cursor 

Add ios/faro/Package.swift with FlutterFramework and PLCrashReporter,
relayout Swift sources under ios/faro/Sources/faro/, raise iOS minimum
to 13.0, and drop stale vendored CrashReporter.xcframework podspec
entries. Bump Dart/Flutter SDK constraints for SPM integration. Fix
analyzer issues so flutter analyze exits zero on stable.

Co-authored-by: Robert Magnusson <robert-northmind@users.noreply.github.com>
@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Apr 10, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Run dart format on the repo so `dart format --set-exit-if-changed .`
matches stable CI. Document in CHANGELOG.

Co-authored-by: Robert Magnusson <robert-northmind@users.noreply.github.com>
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.

Add Swift Package Manager support

2 participants