
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
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: {聽聽"name":聽"upload-whitelist",聽聽"type"...
- Can not login with OAuth
Hello everyone i am trying to login with ios and android in react native - expo but it is not successful. And this is the code which i am using to login
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
