
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
- Attribute creation stuck at processing f...
Hey Appwrite community! 👋 I'm running into a persistent issue with my self-hosted Appwrite installation (v1.6.1) where programmatically creating attributes fo...
- Could not open input file: /usr/src/code...
I updated my selfhosted instance to `1.6.2` and the new service (`appwrite-task-stats-resources`) failed to start. The only log message I see is: ``` Could not ...
- Invalid `specification` param: Specifica...
I'm self-hosting my appwrite instance on my Macbook, and I created a Python function using the command `appwrite init functions` and it outputed the below into ...
