Skip to content

feat: Swift SDK update for version 19.0.0#65

Merged
ArnabChatterjee20k merged 2 commits into
mainfrom
dev
Jun 1, 2026
Merged

feat: Swift SDK update for version 19.0.0#65
ArnabChatterjee20k merged 2 commits into
mainfrom
dev

Conversation

@premtsd-code

@premtsd-code premtsd-code commented May 27, 2026

Copy link
Copy Markdown
Contributor

This PR contains updates to the Swift SDK for version 19.0.0.

@greptile-apps

greptile-apps Bot commented May 27, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Swift SDK to version 19.0.0, adding a new Organization service (API key and project management), new policy models (PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail), and parallel chunked file uploads via withThrowingTaskGroup.

  • New Organization service adds full CRUD for organization-scoped API keys and projects, backed by new OrganizationKeyScopes enum and ProjectList model.
  • Model updates rename ActivityEvent user fields to actorType/actorId/actorEmail/actorName, add providerBranches/providerPaths to Function and Site, and add resourceType/resourceId to UsageGauge.
  • Presences service drops generic type parameters from all methods and renames updatePresence to update, with Presence.metadata now typed as [String: AnyCodable]?.

Confidence Score: 4/5

Safe to merge after fixing the metadata nil-handling bug in Presence.from(map:).

The Presence.from(map:) method maps an absent or null metadata field to an empty dictionary [:] rather than nil. Since metadata is declared as [String: AnyCodable]?, callers that nil-check the field to detect "no metadata" will silently receive the wrong answer when responses are deserialized through this path. The rest of the changes — new Organization service, model field additions, enum renames, and parallel upload — look correct.

Sources/AppwriteModels/Presence.swift — the from(map:) metadata mapping.

Important Files Changed

Filename Overview
Sources/Appwrite/Client.swift Introduces parallel chunked upload via withThrowingTaskGroup (up to 8 concurrent chunks) and extracts upload ID before the first request. First chunk is still sent sequentially to acquire the $id; remaining chunks run in parallel with the captured upload ID.
Sources/Appwrite/Services/Organization.swift New service for organization-scoped API keys and projects (CRUD). Follows established patterns for all other services; no logic issues.
Sources/Appwrite/Services/Presences.swift Drops generic type parameters from all presence methods and renames updatePresenceupdate, simplifying the public API surface.
Sources/AppwriteModels/Presence.swift Removes generic type parameter, makes metadata optional. from(map:) maps missing/null metadata to [:] instead of nil, inconsistent with the Codable decode path that correctly returns nil.
Sources/AppwriteModels/ActivityEvent.swift Renames userType/userId/userEmail/userName fields to actorType/actorId/actorEmail/actorName throughout — a breaking rename aligned with API v19.
Sources/AppwriteModels/Function.swift Adds providerBranches and providerPaths fields decoded as [String]. Both use force-cast as! [String] in from(map:) which is consistent with the rest of the model layer.
Sources/AppwriteModels/Site.swift Same providerBranches/providerPaths additions as Function.swift, applied consistently.
Sources/AppwriteModels/UsageGauge.swift Adds resourceType and resourceId fields to match new API response shape.
Sources/AppwriteModels/ProjectList.swift New list model for projects returned from Organization.listProjects.
Sources/AppwriteEnums/OrganizationKeyScopes.swift New enum for organization-level API key scopes used by Organization.createKey and Organization.updateKey.

Reviews (2): Last reviewed commit: "chore: update Swift SDK to 19.0.0" | Re-trigger Greptile

Comment on lines +186 to +194
return try await client.call(
method: "DELETE",
path: apiPath,
headers: apiHeaders,
params: apiParams )
}

///
/// Get a list of all projects. You can use the query params to filter your

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing newline before closing ) on the client.call invocation — the same style issue exists in deleteProject below.

Suggested change
return try await client.call(
method: "DELETE",
path: apiPath,
headers: apiHeaders,
params: apiParams )
}
///
/// Get a list of all projects. You can use the query params to filter your
return try await client.call(
method: "DELETE",
path: apiPath,
headers: apiHeaders,
params: apiParams
)
}
///
/// Get a list of all projects. You can use the query params to filter your

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +360 to +368
return try await client.call(
method: "DELETE",
path: apiPath,
headers: apiHeaders,
params: apiParams )
}


}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Same formatting issue in deleteProject — closing ) is on the same line as the last argument.

Suggested change
return try await client.call(
method: "DELETE",
path: apiPath,
headers: apiHeaders,
params: apiParams )
}
}
return try await client.call(
method: "DELETE",
path: apiPath,
headers: apiHeaders,
params: apiParams
)
}
}

Comment thread Sources/Appwrite/Client.swift
@ArnabChatterjee20k ArnabChatterjee20k changed the title feat: Swift SDK update for version 18.0.0 feat: Swift SDK update for version 19.0.0 Jun 1, 2026
@ArnabChatterjee20k ArnabChatterjee20k merged commit e3cde0d into main Jun 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants