A swift script that builds your Swift project on a remote machine.
For example, let's say you want to write some swift code on your raspberry pi, with this script you can write your code in Xcode and use this script to sync your project to your raspberry pi! This project was inspired by the Swish script.
In order for this script to work properly, you need to setup your SSH authentication between your mac and your remote machine. How do you know if this is already setup? Perform the following steps:
ssh <username>@<hostname>
.Passwordless SSH Access
. We need to do this because when we are executing this script via Xcode, there is no means to respond to a prompt while the script is executing. This article walks through the process of setting up the connection between your mac and remote machine.$ mint install digimarktech/Xport
Once you have installed Xport
, it can be used to transfer the code you have written in Xcode to your remote machine or Raspberry Pi. Below are the steps necessary to get everything working.
External Build System
.Add your swift pacakage
. This is the code that you have written to execute on the raspberry pi. If you have already created a package locally, you can simply drag it in. Otherwise, you can import it via its hosted github URL or create a new package altogether.
Provide the values for your External Build Tool Configuration
. Here are the fields:
Xport
was installed. If you used Mint to install it, you can use the following path /usr/local/bin/xport
Xport
script to execute it. The first argument represents the username
used on your Raspberry Pi. The default username is pi
. The second argument is the hostname
or ip-address
used to connect to your pi.CMD + B
to build and execute the script. If you want to see a log of the script use the Report Navigator
tab in Xcode.Marc Aupont, @digimarktech
Xport is available under the MIT license. See the LICENSE file for more info.