Skip to content

feat(ios): add Swift Package Manager support#455

Open
TeddyYeung wants to merge 1 commit into
AppsFlyerSDK:masterfrom
TeddyYeung:feat/add-spm-support
Open

feat(ios): add Swift Package Manager support#455
TeddyYeung wants to merge 1 commit into
AppsFlyerSDK:masterfrom
TeddyYeung:feat/add-spm-support

Conversation

@TeddyYeung

Copy link
Copy Markdown

Why

Flutter 3.44+ makes Swift Package Manager (SPM) the default for iOS builds. CocoaPods trunk will be read-only from December 2, 2026. Plugins without SPM support will require users to pass `--disable-swift-package-manager` on every build.

This PR adds iOS SPM support to `appsflyer_sdk` so it works seamlessly with modern Flutter toolchains.

What changed

  • Added `ios/appsflyer_sdk/Package.swift` — SPM manifest (swift-tools-version 5.9, iOS 12.0)
  • Added `ios/appsflyer_sdk/Sources/appsflyer_sdk/` — ObjC SPM target (mirrors Classes/ ObjC files)
  • Updated `CHANGELOG.md`
  • Updated `.gitignore` — added `.build/` and `.swiftpm/`

Architecture note

  • The plugin is ObjC-only (no Swift files in Classes/), so SPM supports it as a single ObjC target.
  • `AppsFlyerFramework` 6.18.0 is declared as an SPM binary dependency (already has SPM support via xcframework).
  • CocoaPods path (`ios/Classes/`) is unchanged — full backward compatibility.

Testing

  • ✅ `flutter build ios --no-codesign` with SPM enabled — Build succeeded
  • ✅ `flutter build ios --no-codesign` with CocoaPods (SPM disabled) — Build succeeded

Tested with Flutter 3.35.7 on macOS.

Breaking Changes

None. CocoaPods behavior is unchanged.

References

@TeddyYeung TeddyYeung force-pushed the feat/add-spm-support branch from 0da64ce to 9fb6f06 Compare June 26, 2026 08:53
@yanashenyang

Copy link
Copy Markdown

The following plugins do not support Swift Package Manager for ios:

  • appsflyer_sdk
    This will become an error in a future version of Flutter. Please contact the plugin maintainers to request Swift Package Manager adoption.

@yanashenyang

Copy link
Copy Markdown
The following plugins do not support Swift Package Manager for ios:
  - appsflyer_sdk
This will become an error in a future version of Flutter. Please contact the plugin maintainers to request Swift Package Manager adoption.

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.

2 participants