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
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...