fix(spm): Lower iOS deployment target to v13 in Package.swift#69
Open
waitwalker wants to merge 2 commits into
Open
fix(spm): Lower iOS deployment target to v13 in Package.swift#69waitwalker wants to merge 2 commits into
waitwalker wants to merge 2 commits into
Conversation
- Lower the iOS platform deployment target in `ios/screen_protector/Package.swift` from `.v15` to `.v12`. - Align the Swift Package Manager (SPM) platform configuration with the existing CocoaPods `.podspec` deployment target, which is already set to `s.ios.deployment_target = '12.0'`. - The plugin's Swift implementation (`ScreenProtectorPlugin.swift`) already contains backward-compatible checks such as `#available(iOS 13.0, *)` and `#available(iOS 11.0, *)`, meaning it is fully capable of running on older iOS versions and has no strict dependency on iOS 15 APIs. - The underlying dependency `ScreenProtectorKit` also specifies `.iOS(.v12)` in its package manifest. - This change prevents build failures due to version mismatch when integrating this plugin into Flutter apps targeting iOS versions below 15.0 using SPM.
- Lower the iOS platform deployment target in `ios/screen_protector/Package.swift` from `.v15` to `.v13`. - Align the Swift Package Manager (SPM) platform configuration with the existing CocoaPods `.podspec` deployment target, which is already set to `s.ios.deployment_target = '12.0'`. - The plugin's Swift implementation (`ScreenProtectorPlugin.swift`) already contains backward-compatible checks such as `#available(iOS 13.0, *)` and `#available(iOS 11.0, *)`, meaning it is fully capable of running on older iOS versions and has no strict dependency on iOS 15 APIs. - The underlying dependency `ScreenProtectorKit` also specifies `.iOS(.v13)` in its package manifest. - This change prevents build failures due to version mismatch when integrating this plugin into Flutter apps targeting iOS versions below 15.0 using SPM.
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.
Description
This PR lowers the minimum iOS platform version in
ios/screen_protector/Package.swiftfrom.v15to.v13.Why is this needed?
.v15restriction causes dependency resolution failures (version mismatch) when integrating this plugin into Flutter apps targeting iOS 13.0 or 14.0 via Swift Package Manager.ScreenProtectorPlugin.swift) does not use any iOS 15+ exclusive APIs. In fact, it already contains backward-compatible checks like#available(iOS 13.0, *)and#available(iOS 11.0, *).ScreenProtectorKitlibrary itself specifies iOS 12.0 as its minimum version..v13provides a much better out-of-the-box experience for the majority of Flutter apps using SPM.