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
- Cannot use custom SMTP for messaging (SM...
Hey there! I'm on Appwrite Self-hosted 1.9.0. I've never used the messaging feature before, always sent emails through functions or a custom backend, but I'v...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- Appwrite 1.9.0 doctor fails tho database...
So i was testing in a local environment the upgrade for 1.9.0, and after getting everything into a running state, i checked the logs that shows : ``` └── Cre...