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
SwiftLint 0.52.3/4: The package product ... requires minimum platform version 13.0 for the iOS platform, but this target supports 11.0 #5208
Comments
+1 |
Confirmed on our Azure DevOps CI/CD as well |
FYI my issue #5228 has been solved with the release of 0.53.0. I close my own issue......... |
Still reproducible for me with SwiftLint 0.53.0 and Xcode 15.0 when trying to execute test for a package with xcodebuild: xcodebuild test -scheme MyPackageScheme -sdk iphonesimulator17.0 -destination "OS=17.0,name=iPhone 15 Pro" I get almost the same output:
Once I remove SwiftLint from package dependencies, everything starts working, but I really want to run SwiftLint on CI for PR builds. |
same for me, SwiftLint 0.53.0 and Xcode 14.3 |
So I am lucky. But I use Xcode 15.0. |
@curia-damiano, just out of curiosity: did you have these errors while building an app or a standalone Swift package? |
Yes, identical error messages, in fact I've opened issue #5228. As said, even my issue was not closed (I have closed it myself), but I've seen and tested release 0.53.0, and under Xcode 15.0, it works fine to me. |
FYI I reopen my issue because on a different project I get exactly the same error, even with 0.53.0 |
v0.53.0 hasn't fixed it over here. Only updated the error to say it requires support for iOS 12 instead of 11. So improved I guess, but definitely NOT fixed. |
Please read the error messages that Xcode is providing carefully. Your projects are configured in such a way that Xcode is attempting to build SwiftLint for iOS, which will not compile. SwiftLint supports building and running on macOS and Linux only. This appears to be a common mistake. Please try this suggestion to see if it helps: #3073 (comment) |
I have the exact same issue with Azure, and I haven't added any SwiftLint products in the target. It's only added as a plugin during build phase, but still, I get the same error. |
Seeing the same issue using Github Actions. We're not using the plugin with an app project and Swiftlint has not been added to the app target. We're only using the SPM plugin with some local packages. Tried with
|
@jpsim It's looking like this issue is completely resolved for me on main. Do we know if there is any plan to cut another release for SPM so we can get the fix? |
➕ |
New Issue Checklist
Describe the bug
So we added the SwiftLint plugin to the app project and also the SPM modules
Package.swift
file. We then checked the project target version was iOS16.1 and specified that in theplatforms
section of thePackage.swift
file.This all works well within Xcode.
However when we started building our CI scripts and running
xcodebuild
the compilation fails with a stream of messages about the minimum OS target version being 11. For example:And of course a whole bunch of compilation failures due to various APIs such as async/await not being available in iOS11.
I've tried running
xcodebuild
from the command line like this:xcodebuild -workspace Rhythm.xcworkspace -scheme Application -configuration Debug -sdk iphonesimulator16.4 -destination 'platform=iOS Simulator,name=iPhone 14,OS=16.4' -skipPackagePluginValidation clean build
But no luck and no change.
I dumped out the SPM dependencies which look like this:
Suspecting from the errors that the root problem was something SwiftLint depended on. I then removed SwiftLint and the command line builds started working.
Environment
The text was updated successfully, but these errors were encountered: