Skip to content

Instantly share code, notes, and snippets.

@RockinPaul
Last active January 16, 2019 06:16
Show Gist options
  • Save RockinPaul/a15688c532e0ae7c54379f2956fc4b9f to your computer and use it in GitHub Desktop.
Save RockinPaul/a15688c532e0ae7c54379f2956fc4b9f to your computer and use it in GitHub Desktop.
sudo xcode-select --reset swift build
sudo xcode-select --reset
swift build
// The whole process
swift package init --type executable
swift build
swift run <app-name>
// Adding dependencies (RxSwift example)
import PackageDescription
let package = Package(
name: "RxTestProject",
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", "4.0.0" ..< "5.0.0")
],
targets: [
.target(name: "RxTestProject", dependencies: ["RxSwift", "RxCocoa"])
]
)
// And then
swift build
swift package update
swift package generate-xcodeproj
// To make release build
swift package update
swift build -c release // -c is for --configuration
swift run -c release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment