feat(ios): add Swift Package Manager support#224
Open
TeddyYeung wants to merge 1 commit into
Open
Conversation
7d2ff2d to
6a16acd
Compare
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.
Why
Flutter 3.27+ 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
--no-enable-swift-package-manageron every build.This PR adds iOS SPM support to
freeraspso it works seamlessly with modern Flutter toolchains.What changed
ios/freerasp/Package.swift— SPM manifest (swift-tools-version 5.9, iOS 12.0)ios/freerasp/TalsecRuntime.xcframework— symlink to local binary target (mirrors existingios/TalsecRuntime.xcframework)ios/freerasp/Sources/freerasp/— Swift-only SPM target (mirrors Classes/ Swift files)ios/freerasp.podspec— iOS platform 8.0 → 12.0pubspec.yaml— iOS pluginClass: SwiftFreeraspPlugin (direct Swift registration for SPM)CHANGELOG.md— 8.0.1 entry.gitignore— added.build/and.swiftpm/Architecture note
SPM does not support mixed-language targets (ObjC + Swift in the same target). The solution:
Sources/freerasp/) +TalsecRuntimeas a localbinaryTargetios/Classes/with ObjC wrapper + Swift +vendored_frameworks(unchanged)TalsecRuntime.xcframeworkis already bundled in the repository — no remote download requiredTesting
flutter config --enable-swift-package-manager && flutter build ios --no-codesign— Build succeededflutter config --no-enable-swift-package-manager && flutter build ios --no-codesign— Build succeededTested with Flutter 3.35.7 on macOS.
Breaking Changes
None. CocoaPods behavior is unchanged.
References