Install Swift
To use Alchemy, you’ll first need to make sure Swift is installed.Install and open the latest Xcode.
Create a Project
Once that’s finished, create a new project using the create Alchemy app script.Run the App
Finally, run your app and visit localhost:3000 in the browser.Setup your Editor
There are two main editor options for writing Swift - Xcode and Visual Studio Code. Here are some helpful tips for you to get set up with either.Xcode
Xcode
Set a custom working directoryBy default, Xcode builds and runs all projects in a separate directory;
~/Library/Developer/Xcode/DerivedData/
. This isn’t an issue for iOS apps, but it means that your Alchemy app won’t be able to access important assets in your project such as an .env
file or a Public/
directory.Fortunately this is simple to fix. You just need to tell Xcode to build and run your app in the root directory of your project: Command + Shift + <
-> Run
-> Options
-> select 'Use custom working directory:'
-> enter the root directory of your project
.Accessing hidden filesYou’ll likely be configuring your Alchemy app with a .env
file. Xcode is unable to edit or view hidden files (files prefaced with a .
). When it comes time to work with these files, you’ll need to use a text editor that can access them such as Visual Studio Code.Visual Studio Code
Visual Studio Code
Install the official Visual Studio Code extension for
Swift .