Category: Swift on Linux
-
Swift on Linux: Package Manager Resources
A new feature for Swift 5.3 is Package Manager Resources which allows files such as .md, .png, .jpg, .txt and .pdf to be explicitly designated as resources and included as part of the built product for a SPM module. The following is a demonstration of Package Manager Resources with a SPM CLI application called Dapper,…
-
Swift on Linux: What Kind of Applications Will I build?
The iOS Developer Community Survey has a section which asks respondents to rate their current adoption of Swift for building applications that will deploy to a server environment. The adoption is quite low (~3%). One highly rated standout though, is the Vapor Framework for building web applications in Swift. The survey results of similar programming…
-
Swift on Linux: SPM
The Swift Package Manager (SPM) is a tool for creating Swift applications and managing their dependencies. SPM supports Executable and Library projects and is included as part of the Swift installation. Prerequisites1. You’ll need Swift and Git installed before using SPM. To make a new Swift application, setup a folder for the project.$ mkdir -p…
-
Swift on Linux: REPL
Swift provides an interactive Read Eval Print Loop (REPL), which is accessed by typing swift at the command prompt. $ swiftWelcome to Swift version 5.2.2 (swift-5.2.2-RELEASE).Type :help for assistance.1> Lets try a new feature from the latest version of Swift. We can see what is new in Swift from the Revision History. One interesting new…
-
Swift on Linux: Getting Started
Swift currently officially supports running on Ubuntu (16.04, 18.04, 20.04) and Red Hat derivatives (currently CentOS 8 and Amazon Linux 2). These are a few ways to get Linux*; A Virtual Machine e.g. VirtualBox A repurposed PC e.g. try using a live USB A dedicated PC e.g. System76 However you choose to get Linux, install…