Skip to content

Add Swift Package Manager support for the iOS plugin#10

Open
qMalte wants to merge 1 commit into
TechSupportz:mainfrom
qMalte:main
Open

Add Swift Package Manager support for the iOS plugin#10
qMalte wants to merge 1 commit into
TechSupportz:mainfrom
qMalte:main

Conversation

@qMalte

@qMalte qMalte commented Jul 5, 2026

Copy link
Copy Markdown

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

  • Move the native sources into a Swift package layout under ios/native_glass_navbar/:
    • ios/Classes/*.swiftios/native_glass_navbar/Sources/native_glass_navbar/
    • ios/Resources/PrivacyInfo.xcprivacyios/native_glass_navbar/Sources/native_glass_navbar/
  • Add ios/native_glass_navbar/Package.swift (target native_glass_navbar, product native-glass-navbar, iOS 13.0, privacy manifest as a processed resource). Flutter is intentionally not declared as a dependency — it is provided by the app-level generated Flutter Swift package.
  • Update native_glass_navbar.podspec to point at the shared sources, enable the privacy resource_bundles, and replace the leftover template placeholders (version, summary, homepage, author) with the real plugin details.

No changes to pubspec.yaml are required — Flutter detects SPM automatically via the Package.swift.

Notes / testing

  • swift package dump-package confirms the manifest is valid.
  • The example app still uses CocoaPods; to build against SPM, enable it with flutter config --enable-swift-package-manager. The plugin supports both build systems in parallel.

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.
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.

1 participant