appwrite-swift

Implements Appwrite backend operations in Swift for Apple platforms and server-side applications.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/aadilmallick/myfitness-pal-clone --skill appwrite-swift-aadilmallick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appwrite-swift
Source: https://github.com/aadilmallick/myfitness-pal-clone/tree/main/.agents/skills/appwrite-swift
Command: npx skills add https://github.com/aadilmallick/myfitness-pal-clone --skill appwrite-swift-aadilmallick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building apps with Appwrite in Swift requires knowing the correct SDK patterns for authentication, database queries, file storage, real-time subscriptions, and server-side administration, and mistakes like using deprecated classes or missing permissions cause hard-to-debug failures. ## Core Features & Use Cases - Client and Server Setup: Configure Appwrite clients for iOS, macOS, watchOS, tvOS, and server-side Swift with API keys, sessions, and SSR cookie handling for frameworks like Vapor. - Full SDK Coverage: Provides working code for email/OAuth authentication, TablesDB row CRUD with typed string columns, Query builders, file uploads, teams, real-time subscriptions, and serverless functions. - Permissions and Error Handling: Documents the Permission and Role model, common error codes, and pitfalls such as forgetting permissions or granting write access to Role.any(). - Use Case: When adding a feature to an iOS app that queries an Appwrite table with filters and pagination, use this Skill to generate correct TablesDB and Query code with proper permissions instead of guessing SDK method signatures. ## Quick Start Use the appwrite-swift skill to write Swift code that creates an Appwrite client, queries rows from a table with filters, and handles errors.

Frequently Asked Questions about appwrite-swift

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Appwrite database rows in Swift?

Use the TablesDB class with listRows and pass Query helpers such as Query.equal, Query.greaterThan, Query.orderDesc, and Query.limit. Prefer cursor pagination with Query.cursorAfter for large datasets, and use named parameters for all method calls.

How to implement Appwrite authentication in an iOS Swift app?

Create an Account instance from a configured Client, then call createEmailPasswordSession for email login or createOAuth2Session for providers like Google. Retrieve the current user with account.get() and log out with deleteSession using the current session ID.

Should I use Databases or TablesDB in the Appwrite Swift SDK?

Use TablesDB for all new code because the Databases class is deprecated. Only use Databases when maintaining an existing codebase that already relies on it or when explicitly required.

Does the Appwrite Swift SDK support server-side rendering with Vapor?

Yes, server-side Swift works with two clients: an admin client using an API key to create sessions, and a per-request session client that reads the a_session_<PROJECT_ID> cookie. Set the cookie with isHTTPOnly, isSecure, and sameSite strict.

Why do Appwrite requests return 401 or 403 errors in Swift?

A 401 means the session or API key is missing or invalid, while 403 means the user lacks permissions on the resource. Check that row or file permissions include the user via Permission.read(Role.user(...)) or appropriate team roles.

How do I subscribe to real-time database changes in Swift?

Create a Realtime instance and call subscribe with channels such as Channel.tablesdb(databaseId).table(tableId).row(). The closure receives events, payload, channels, and timestamp; call close() on the subscription when done.