Conversation
Add a Swift package alongside the existing podspec so the plugin can be consumed via Flutter's Swift Package Manager. CocoaPods keeps working as a fallback and both build systems share the same sources. - Add ios/webview_cookie_manager/Package.swift (target iOS 12.0) - Convert the plugin to pure Swift and rename SwiftWebviewCookieManagerPlugin -> WebviewCookieManagerPlugin, dropping the Objective-C registration shim (SPM targets can't mix languages) - Move sources to Sources/webview_cookie_manager/ and add PrivacyInfo.xcprivacy - Point podspec source_files/resource_bundles at the new layout and clean up placeholder metadata; bump min iOS to 12.0 - Ignore .build/ and .swiftpm/
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.
This PR bundles two independent changes from my fork.
1. Swift Package Manager support (iOS)
Adds a Swift package alongside the existing podspec so the plugin can be consumed via Flutter's Swift Package Manager. CocoaPods keeps working as a fallback and both build systems share the same sources (no duplication).
ios/webview_cookie_manager/Package.swift(target iOS 12.0)SwiftWebviewCookieManagerPlugin→WebviewCookieManagerPlugin, dropping the Objective-C registration shim (SPM targets can't mix languages)ios/webview_cookie_manager/Sources/webview_cookie_manager/and add aPrivacyInfo.xcprivacymanifestsource_files/resource_bundlesat the new layout, clean up placeholder metadata, and bump the min iOS deployment to 12.0 (Flutter's current floor).build/and.swiftpm/No
pubspec.yamlchange is required — Flutter auto-detectsPackage.swiftandpluginClass: WebviewCookieManagerPluginstays valid.Note on the min iOS bump
The deployment target moves from 11.0 to 12.0, which matches Flutter's current minimum. Happy to revisit if you'd prefer to keep 11.0.
2. Android: remove redundant
namespacedeclarationandroid/build.gradledeclarednamespacetwice; removed the duplicate.Testing
The SPM integration was verified by consuming this branch as a git dependency in a separate Flutter app with
--enable-swift-package-managerand building for iOS.