Repository navigation
Add Swift Package Manager support for iOS - #9
Closed
TeddyYeung wants to merge 1 commit into
Closed
TeddyYeung wants to merge 1 commit into
TeddyYeung wants to merge 1 commit into
Conversation
Restructure ios/Classes into ios/flutter_mute/Sources/flutter_mute per Flutter's federated-plugin SPM layout and add Package.swift. - Public header moved under Sources/flutter_mute/include/flutter_mute so it is discoverable via cSettings.headerSearchPath. - mute.aiff moved under Sources/flutter_mute/Resources and declared as a processed SPM resource; MuteDetect looks it up via Bundle.module under SWIFT_PACKAGE, falling back to Bundle(for:) for CocoaPods. - flutter_mute.podspec source_files/resources updated to the new paths; CocoaPods consumers are unaffected.
Author
|
Closing, since this repository is not accepting changes. This change and the fixes from #6 and #7 are published in flutter_mute_plus. |
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.
What
Adds Swift Package Manager support for the iOS implementation, alongside the existing CocoaPods podspec (no breaking change for current consumers).
Why
Flutter added first-class SPM support for plugins; apps that opt into
flutter.plugin.platforms.iosPackage.swift resolution can't currently pick this plugin up because there's noios/flutter_mute/Package.swift.How
ios/Classes/*intoios/flutter_mute/Sources/flutter_mute/*(Flutter's documented federated-plugin SPM layout).Sources/flutter_mute/include/flutter_mute/and exposed viacSettings.headerSearchPathinPackage.swift.mute.aiffmoved toSources/flutter_mute/Resourcesand declared as an SPM.process()resource.MuteDetect.swiftnow resolves the sound file viaBundle.moduleunder#if SWIFT_PACKAGE, falling back to the originalBundle(for:)lookup for CocoaPods builds.flutter_mute.podspecsource_files/resourcesupdated to the new paths — CocoaPods integration is otherwise unchanged.Testing
Verified the file layout matches Flutter's official plugin SPM migration guide. I don't have a maintainer-side CI/example app to run a full
flutter build iosagainst both resolution paths — please let me know if you'd like anything else checked before merging.