Sometimes when writing a block of Swift code, I don’t bother to launch Xcode. Running the Swift commands swift and swiftc from the terminal are more lightweight and convenient. To debug and set a breakpoint, lldb does the job.

1. ‘swift’ Command to Get the Swift Version

After installing the latest version of Swift from the download page, I’ll run the command to verify I’m running the expected Swift version:

$ swift --version

This is image title

Swift version

  • It shows I’m currently on Swift 5.3
  • The Swift/Objective-C compiler is on version 12
  • The Swift environment is MacOS Catalina on a 64 bit CPU

#ios #swift #mobile #programming #xcode

10 Tips to Run Swift From Your Terminal
1.95 GEEK