feat: add iOS Swift Package Manager support#20
Open
melihcelik-hubx wants to merge 1 commit into
Open
Conversation
…retrieval - Updated podspec version to 3.0.0 and improved summary and description. - Added Package.swift for Swift Package Manager support. - Implemented FkUserAgentPlugin in Objective-C to retrieve device user agents. - Enhanced user agent retrieval logic to include WebView user agents. - Updated Dart API to support async property fetching and improved initialization logic. - Updated pubspec.yaml and pubspec.lock for Dart SDK and Flutter version compatibility. - Added comprehensive tests for user agent properties and initialization behavior.
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 support for the iOS side of
fk_user_agentwhile preserving CocoaPods compatibility for the plugin package.This PR also updates the package to a Dart 3 / newer Flutter baseline, migrates the example iOS app to a SwiftPM-only setup, and adds focused unit coverage for the Dart-side caching behavior.
Changes
Package.swiftSources/...layout^3.11.0>=3.41.013.0.pubignoreto keep publish artifacts cleanerFkUserAgentcache/init/release behaviorWhy
Flutter now supports Swift Package Manager for iOS plugins, and plugin consumers are gradually moving away from CocoaPods. This change makes the plugin compatible with SwiftPM-based iOS integration without dropping CocoaPods support for users who still rely on it.
Breaking Changes
This PR should be released as a major version.
^3.11.0>=3.41.013.0Validation
Dart / package
flutter testflutter analyzeExample app
flutter pub getflutter build ios --simulator --debug --no-codesignCocoaPods compatibility
flutter config --no-enable-swift-package-managerpod lib lint ios/fk_user_agent.podspec --configuration=Debug --skip-tests --use-modular-headers --use-librariespod lib lint ios/fk_user_agent.podspec --configuration=Debug --skip-tests --use-modular-headersSwiftPM compatibility
flutter config --enable-swift-package-managerflutter build ios --simulator --debug --no-codesignNotes