You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains updates to the SDK for version 18.3.0.
What's Changed
Client.setBearermethod for OAuth bearer token authenticationQuery.vectorDot,Query.vectorCosine,Query.vectorEuclideanvector similarity query methodsappwritecase toOAuthProviderenumLocalefields:city,timeZone,postalCode,latitude,longitude, ASN, ISP, connection infoasync-http-clientandswift-niodependencies