Skip to content

feat: Apple SDK update for version 18.3.0 - #121

Merged
ChiragAgg5k merged 2 commits into
mainfrom
dev
Jul 13, 2026
Merged

feat: Apple SDK update for version 18.3.0#121
ChiragAgg5k merged 2 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 18.3.0.

What's Changed

  • Added: Client.setBearer method for OAuth bearer token authentication
  • Added: Query.vectorDot, Query.vectorCosine, Query.vectorEuclidean vector similarity query methods
  • Added: appwrite case to OAuthProvider enum
  • Added: optional Locale fields: city, timeZone, postalCode, latitude, longitude, ASN, ISP, connection info
  • Updated: minimum toolchain to Swift 6.1; bumped async-http-client and swift-nio dependencies

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR delivers the 18.3.0 Apple SDK update for Appwrite, adding OAuth bearer token authentication, three vector-similarity query methods, a new OAuthProvider.appwrite case, and eleven optional geolocation/network fields on the Locale model.

  • Client.setBearer stores the token in config[\"bearer\"] and correctly sets Authorization: Bearer <token> via addHeader, consistent with how setJWT and setSession are implemented.
  • Query.vectorDot/vectorCosine/vectorEuclidean pass [vector] (a [[Double]]) through the existing convertToQueryValueArray nested-array path, which recursively converts it to [.array([.double(...)])] and serializes as {\"method\":\"vectorDot\",\"attribute\":\"…\",\"values\":[[…]]}.
  • Locale new fields are all declared as Optional, use decodeIfPresent/encodeIfPresent, and follow the same camelCase CodingKey convention as the existing fields.

Confidence Score: 5/5

Safe to merge — all changes are additive and follow existing patterns in the codebase.

The new setBearer method correctly applies the Bearer prefix, the vector query methods route through the well-tested convertToQueryValueArray nested-array path, and the optional Locale fields use decodeIfPresent throughout. The swift-tools-version and dependency bumps are intentional and documented in the CHANGELOG.

No files require special attention.

Important Files Changed

Filename Overview
Sources/Appwrite/Client.swift Adds setBearer method with correctly formatted Authorization: Bearer <token> header; version bump to 18.3.0
Sources/Appwrite/Query.swift Adds vectorDot, vectorCosine, and vectorEuclidean query methods; vectors are correctly wrapped as [vector] which feeds through the existing nested-array path in convertToQueryValueArray
Sources/AppwriteModels/Locale.swift Adds 11 optional geolocation/network fields with proper decodeIfPresent/encodeIfPresent and consistent camelCase CodingKey raw values matching existing fields
Package.swift Bumps swift-tools-version to 6.1 (intentional per CHANGELOG) and updates async-http-client and swift-nio dependencies
Sources/AppwriteEnums/OAuthProvider.swift Adds appwrite case in alphabetical order between apple and auth0
Sources/AppwriteModels/Log.swift Documentation-only update: adds hidden to the list of possible userType values in the comment
CHANGELOG.md Adds 18.3.0 release entry accurately reflecting all changes in this PR
README.md Updates the package dependency example version from 18.2.0 to 18.3.0

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

Comment thread Sources/Appwrite/Client.swift Outdated
@ChiragAgg5k
ChiragAgg5k merged commit 2d9998d into main Jul 13, 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