
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
- Error Getting Github token on 1.7.4
I set up GitHub integration on Selfhost using version 1.7, and it was working correctly since then. After upgrading to version 1.7.4 with the same configuration...
- API Endpoint to Verify Password.
I have 2 use cases where i need to verify a users password outside of login, e.g. Updating user account data (such as name, or prefs, or data in a users databa...
- Corrupted files on AWS S3
Hello! I'm having trouble using S3 storage with appwrite for file uploads. It happens when uploading files from the Javascript SDK or from the console. The fi...
