Add Swift Package Manager support for the iOS plugin#10
Open
qMalte wants to merge 1 commit into
Open
Conversation
Move the native sources into a Swift package under ios/native_glass_navbar/ and add a Package.swift manifest so the plugin can be consumed via Swift Package Manager. The CocoaPods podspec now shares the same sources and privacy manifest, and its placeholder metadata was replaced with the real plugin details.
This was referenced Jul 5, 2026
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
Adds Swift Package Manager (SPM) support to the iOS plugin, alongside the existing CocoaPods setup. Both build systems now share the same native sources and privacy manifest.
Changes
ios/native_glass_navbar/:ios/Classes/*.swift→ios/native_glass_navbar/Sources/native_glass_navbar/ios/Resources/PrivacyInfo.xcprivacy→ios/native_glass_navbar/Sources/native_glass_navbar/ios/native_glass_navbar/Package.swift(targetnative_glass_navbar, productnative-glass-navbar, iOS 13.0, privacy manifest as a processed resource).Flutteris intentionally not declared as a dependency — it is provided by the app-level generated Flutter Swift package.native_glass_navbar.podspecto point at the shared sources, enable the privacyresource_bundles, and replace the leftover template placeholders (version, summary, homepage, author) with the real plugin details.No changes to
pubspec.yamlare required — Flutter detects SPM automatically via thePackage.swift.Notes / testing
swift package dump-packageconfirms the manifest is valid.flutter config --enable-swift-package-manager. The plugin supports both build systems in parallel.