Skip to content

Conversation

@ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Oct 22, 2025

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

Summary by CodeRabbit

  • New Features
    • Added onOpen, onClose, and onError callbacks for the Realtime service.

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Walkthrough

This pull request bumps the SDK version from 13.2.2 to 13.3.0. The changes include a new changelog entry documenting three new Realtime service callbacks (onOpen, onClose, and onError), version updates in the Swift Package Manager example within the README, and an updated x-sdk-version header value in the Client class.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

The changes are homogeneous version number updates across three files with consistent patterns. The CHANGELOG entry is straightforward documentation. No logic modifications, structural changes, or complex reasoning per file is required.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: Swift SDK update for version 13.3.0" is fully related to the main changes in the pull request. The changeset primarily consists of version updates across multiple files (CHANGELOG.md, README.md, and Client.swift), all bumping from version 13.2.2 to 13.3.0, along with documentation of new Realtime service callbacks. The title accurately captures the core objective of this update and is appropriately concise and specific, clearly identifying this as a feature update to the Swift SDK for a specific version. While the title doesn't enumerate every detail (such as the specific callbacks added), this is expected and aligns with good PR titling practices.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4903240 and 82cd2ff.

📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • Sources/Appwrite/Client.swift (1 hunks)
🔇 Additional comments (2)
README.md (1)

36-36: LGTM! Version update is consistent.

The Swift Package Manager dependency version has been correctly updated to match the new SDK version 13.3.0.

Sources/Appwrite/Client.swift (1)

24-24: LGTM! SDK version header correctly updated.

The x-sdk-version header has been updated to "13.3.0", ensuring the server can correctly identify the SDK version during API communication.

Comment on lines +3 to +5
## 13.3.0

* Add `onOpen`, `onClose` and `onError` callbacks to `Realtime` service
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that Realtime service callbacks are implemented.

The changelog documents new callbacks (onOpen, onClose, onError) for the Realtime service, but the implementation is not visible in the provided files.

Run the following script to verify the Realtime service contains these callbacks:


🏁 Script executed:

#!/bin/bash
# Description: Verify that the new Realtime callbacks exist in the codebase

# Search for onOpen, onClose, and onError callback definitions in Realtime service
echo "Searching for onOpen callback..."
rg -n "onOpen" --type swift -C 3

echo -e "\nSearching for onClose callback..."
rg -n "onClose" --type swift -C 3

echo -e "\nSearching for onError callback..."
rg -n "onError" --type swift -C 3

Length of output: 102


🏁 Script executed:

#!/bin/bash
# Description: Broader verification of Realtime service and callbacks

# Find files related to Realtime
echo "Finding Realtime-related files..."
fd -i realtime --type f

echo -e "\n---\nSearching for onOpen, onClose, onError without type restrictions..."
rg -n "(onOpen|onClose|onError)" --type-list | head -20

echo -e "\n---\nSearching for callback patterns in codebase..."
rg -n "onOpen|onClose|onError" -C 2

echo -e "\n---\nSearching for Realtime class/service definition..."
rg -n "class Realtime|struct Realtime|interface Realtime|export.*Realtime" -C 3

Length of output: 773


🏁 Script executed:

#!/bin/bash
# Description: Verify repository structure and check for any service implementations

# List directory structure
echo "Repository structure:"
find . -type f -name "*.md" -o -name "*.ts" -o -name "*.js" -o -name "*.swift" -o -name "*.kt" | head -30

echo -e "\n---\nAll files in repo:"
find . -type f | grep -v ".git" | head -50

echo -e "\n---\nSearching for 'service' or 'callback' mentions:"
rg -n "service|callback" -i | head -20

Length of output: 6913


🏁 Script executed:

#!/bin/bash
# Description: Final verification - search for any Realtime references

echo "Searching for 'Realtime' anywhere in codebase:"
rg -n -i "realtime" 

echo -e "\n---\nListing all Swift files in Services directory:"
find ./Sources/Appwrite/Services -name "*.swift" -type f | sort

Length of output: 813


Realtime service and callbacks are not implemented.

The changelog entry documents onOpen, onClose, and onError callbacks for a Realtime service, but verification shows:

  • No Realtime.swift service file exists in ./Sources/Appwrite/Services/
  • No references to "Realtime" or these callbacks exist anywhere in the codebase
  • This appears to be premature documentation of unimplemented features

Either add the Realtime service implementation with these callbacks or remove the changelog entry.

🤖 Prompt for AI Agents
In CHANGELOG.md around lines 3 to 5, the entry claiming “Add `onOpen`, `onClose`
and `onError` callbacks to `Realtime` service” is documenting functionality that
does not exist; either implement the Realtime service or remove the changelog
entry. To fix: if implementing, add a new
Sources/Appwrite/Services/Realtime.swift matching your project’s service
patterns (namespace, initialiser, network client usage) and expose
onOpen/onClose/onError callback hooks consistent with other service APIs and
unit tests; ensure the file is exported in the package manifest if required and
add references/tests. Otherwise, remove or amend the CHANGELOG.md lines to
reflect the actual implemented features so the changelog matches the codebase.

@ChiragAgg5k ChiragAgg5k deleted the dev branch October 22, 2025 08:48
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