
tl;dr How can I launch a Swift function on Appwrite?
I'm currently trying to launch a function in a runtime that is not supported by Appwrite Cloud at the moment (Swift) but can't seem to figure it out. I also can't find docs that show the complete flow.
What I've done so far
- Setup Appwrite locally w/ Docker
- Created an account via localhost
- Created a project
- Logged in via CLI
- Linked directory with project
- Ran
appwrite functions create --functionId 'tryfunctions' --name firstFunction --runtime 'swift-5.8'
This is the error I receive:
✗ Error Invalid `runtime` param: Value must be one of (node-16.0, php-8.0, ruby-3.0, python-3.9)
I understand that Appwrite Cloud only supports those runtimes as listed in the docs here: https://appwrite.io/docs/products/functions/runtimes but those same docs list Swift as a supported language.
I've also looked under the Development docs https://appwrite.io/docs/products/functions/development but still couldn't figure out how the Swift (or an other alternatative) runtime fits into the flow and how the intial function is generated, if at all.
If existing docs exist, or any other resources, I'd grately appreciate the help.
p.s. if the resources don't exist, I will create them this week

You'll need to enable the runtime: https://appwrite.io/docs/advanced/self-hosting/functions#functions

perfect! Let me try that. I obviously didnt look closely enough at the docs

Thanks Steven

For anyone viewing this thread, you can add a runtime that isn't supported by Cloud by updating the .env
file in the appwrite
directory on your machine (it should be located in the directory wherever you downloaded the Appwrite CLI). Once located, update the runtimes variable with the runtime(s) you're interested in using. Here's an example of what mine looks like:
_APP_FUNCTIONS_RUNTIMES=swift-5.8
You can find a list of runtime names in the doc I referenced in the original post.
Recommended threads
- Explore uploaded images directly from lo...
Is there any option to explore/dwonload uploaded files to from local machine? I connected through WinScp to my vps and to files from docker volume 'appwrite_app...
- Migrate Appwrite
I have appwrite setup in Coolify, where my dev and production both are running on coolify due to upgrade issues and multiple issues when deployed with coolify. ...
- After the new appwrite update, I am havi...
I am having difficulties with Creating and listing documents from appwrite database. It doesn't create the document or list the document from the database altho...
