
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
- DigitalOcean Droplet SMTP failure with m...
Is there any way to get the appwrite 1.6 mailer docker image working on a droplet? I can send emails via the appwrite console, but my magiclinks always fiail wi...
- unable to remove project 500 error
We are unable to remove a project, when clicking setting option it showing 500 Server Error
- API preflight request not working on .f...
When I am calling a function on my APP through the domain is failing. Because the preflight request (OPTIONS HTTP request) times out. this only occurs with fu...
