I'm using the Appwrite CLI to initialize a new function. When I open the generated Package.swift file, I fix a build error and update the Appwrite package dependency to 4.0.1. However, there is one final build error in the generated index.swift source file that I can't figure out. Any ideas on what I'm missing here?
this looks like a local error because your local IDE doesn't have those types.
is there a problem when you deploy it?
The build fails when I deploy with the CLI. The build also fails when I init from the CLI and then immediately deploy
What's the build error?
I'm seeing "Docker Error: Preparing for build" and some warnings in the logs
oh you're self hosting?
it would be best to get logs of specific containers. it's hard to read when mixed together
Yes to self hosting. And are these the correct logs?
Ya build and executor
I can't quite tell why it failed 🧐
What version of Appwrite?
NVM I see it's 1.4.7
Maybe you can try increasing the function memory environment variable in your .env file. Swift usually takes a lot of resources
I'm seeing this same error. It appears that the Appwrite Swift SDK doesn't contain either of these classes: https://github.com/appwrite/sdk-for-swift/tree/main/Sources/AppwriteModels
I was going to see if I could translate an implementation for these objects, but it appears that all the typed languages in the template repo (https://github.com/appwrite/templates) reference this RuntimeContext without an implementation.
It's part of the swift open-runtime
A hacky quick way to compile locally is to copy the open runtime files into your package and add Vapor as dependency, then you can compile your function package with Xcode or xcodebuild. When deploying just ignore or delete the runtime files.
Recommended threads
- TOO_MANY_REDIRECTS after temporarily ena...
I am losing my mind over this, I enabled this setting because I was having issues with sites not making links with https. I enabled it, ran into issues, so I di...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...
- Triggers and call function in function p...
Hello, Today we are experiencing several issues with Appwrite Cloud. Functions triggered by events, or functions called from another function, are taking an e...