
I am using version 1.3.7 and facing with an issue when I try to run a swift function. Is there any example function/documentation about how to deploy a swift function? It was quite challenging for me to adding to the env and downloading the openruntimes swift image by myself.

I believe the syntax for 1.3x was like this:
func main(req: RequestValue, res: RequestResponse) throws -> RequestResponse {
let payload = req.payload.isEmpty ? "No payload provided. Add custom data when executing function" : req.payload
let secretKey = req.variables["SECRET_KEY"] ?? "SECRET_KEY variable not found. You can set it in Function settings."
let randomNumber = Double.random(in: 0...1)
let trigger = req.variables["APPWRITE_FUNCTION_TRIGGER"]
return res.json(data: [
"message": "Hello from Appwrite!",
"payload": payload,
"secretKey": secretKey,
"randomNumber": randomNumber,
"trigger": trigger,
])
}

I have the following linking error

@Binyamin do you have any idea? 🙏

How are you deploying the function?

I am deploying manually with an entry point

Can you try with appwrite-cli
Recommended threads
- Cannot find module failure
Sorry, Newbe question here. I just installed Appwrite and am trying to install my first Function an am having absolutely no luck what-so-ever getting this done...
- Can't push functions when self-hosting o...
Hello, I'm a bit new to appwrite functions and recently hosted a fresh 1.7.4 on my portainer setup. Tried to create a new function and when trying to push it I ...
- Internal curl errors has occurred within...
