Swiftlint Overriding Project Settings Related to Spm

How do I put a swift package in Edit Mode?

If you clone a package locally and drag it into your project or workspace, that local copy will override the (read-only) remote dependency anywhere it was referenced. You can then edit the local copy of the package as needed.

You can see more on this workflow about 23 minutes into the WWDC2019 video for Creating Swift Packages: https://developer.apple.com/videos/play/wwdc2019/410/

Swift Package Manager executable app, set deployment target

This may not help you right now, but the upcoming Swift 5.0 will include the ability to specify the deployment target in the package manifest, using a syntax like this:

...
platforms: [
.macOS(.v10_13), .iOS(.v12),
],
...

(The same is true for some other common build settings.)

Until then, you can override the default deployment target via command line arguments like this:

$ swift build -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.14"

You'll have to include these arguments in every call to swift build, swift run, swift test.



Related Topics



Leave a reply



Submit