Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SPM warning for Xcode 12 and 13 #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DenTelezhkin
Copy link

Unlike CocoaPods, SPM platforms only specify minimum supported deployment targets, and it's recommended to only specify platforms, if minimum supported deployment target is higher than Xcode's, which is not the case here.

When using package on Xcode 13, SPM shows a warning:

.../UICKeyChainStore/Package.swift The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99.

By removing platforms from Package.swift this warning will go away, since now Xcode is in charge of what platforms are supported, and automatically sets minimum deployment target for this package (which, on Xcode 13, is iOS 9).

This does not drop support for iOS 8, as support for iOS 8 was already dropped by Xcode 12, this change only removes a warning.

This PR is an alternative to #188, so you can have a choice in two different approaches. This one seems better to me, as you no longer need to manage deployment versions, and Xcode can just select whatever is supported at the moment.

Unlike CocoaPods, SPM platforms only specify minimum supported deployment targets, and it's recommended to only specify platforms, if minimum supported deployment target is **higher** than Xcode's, which is not the case here.

When using package on Xcode 13, SPM shows a warning: 

`.../UICKeyChainStore/Package.swift The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99.`

By removing platforms from Package.swift this warning will go away, since now Xcode is in charge of what platforms are supported, and automatically sets minimum deployment target for this package (which, on Xcode 13, is iOS 9).

This does not drop support for iOS 8, as support for iOS 8 was already dropped by Xcode 12, this change only removes a warning.

This PR is an alternative to kishikawakatsumi#188, so you can have a choice in two different approaches. This one seems better to me, as you no longer need to manage deployment versions, and Xcode can just select whatever is supported at the moment.
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