feat: migrate iOS/macOS to Swift Package Manager - #158
Open
AlexV525 wants to merge 1 commit into
Open
Conversation
Adopt the SPM layout used by flutter_image_compress: - Move iOS sources to ios/image_editor_common/Sources/image_editor_common/ (.m flat, .h under include/image_editor_common/) - Move macOS sources to macos/image_editor_common/Sources/image_editor_common/ - Add Package.swift (iOS .iOS 9.0, macOS .macOS 10.15) with cSettings headerSearchPath, matching the podspec public_header layout - Update both podspecs to reference the new Sources paths - Add .build/ and Flutter/ephemeral/ to .gitignore - Migrate example iOS project for Flutter SPM integration The Package.swift product name 'image-editor-common' is auto-discovered by Flutter's SPM tooling; no pubspec swiftPackageManager key needed.
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
Migrate
image_editor_commoniOS and macOS native code to Swift Package Manager, following the same SPM layout asflutter_image_compress.Changes
Source restructuring (iOS + macOS)
Classes/→<platform>/image_editor_common/Sources/image_editor_common/*.m(flat)Sources/image_editor_common/include/image_editor_common/*.hgit mv(R100) — full history retainedSwift Package Manager
Package.swiftfor iOS (.iOS("9.0")) and macOS (.macOS("10.15"))image-editor-common, targetimage_editor_commoncSettings: [.headerSearchPath("include/image_editor_common")]for local header resolutionswiftPackageManagerkey — Flutter auto-discoversPackage.swiftPodspec compatibility
Sources/pathsExample & tooling
.gitignore: added**/.build/andFlutter/ephemeral/Verification
Backward compatibility
Both CocoaPods and SPM paths work against the same source tree. The CI matrix here exercises the CocoaPods path; SPM can be verified locally with
flutter config --enable-swift-package-manager.