Issues building with SPM and Xcode 11 (beta 4)
Getting following errors, I have tried latest version (24).
let task = Process()
Use of unresolved identifier 'Process'
if #available(macOS 10.13, *) {
options = [.prettyPrinted, .sortedKeys]
} else {
options = .prettyPrinted
}
'sortedKeys' is only available in iOS 11.0 or newer
SourceKitten doesn’t target iOS.
Do you find a solution ?
SwiftLint has SourceKitten in dependency and Xcode can't compile.
Xcode 11 beta 6
@julienrenier can you share more about the issue you're facing? Are you trying to compile SwiftLint to run on iOS? That definitely won't work since the Swift compiler and SourceKit aren't readily portable to iOS either.
@jpsim I'm trying to remove pods from my project, I thought that I can simply add swiftlint package with SwiftPM in my iOS app.
The SwiftLint cocoapod for iOS/tvOS/watchOS targets is a bit of a hack, where it's not meant to target those platforms but rather to be invoked from the macOS machine maintaining the project.
When you add the SwiftLint pod to your Podfile, you just pull in its precompiled macOS CLI binary, which you can then invoke using something like ${PODS_ROOT}/SwiftLint/swiftlint.
This approach won't work if you're trying to build SwiftLint (or SourceKitten) for an iOS target from source.