Skip to content

Conversation

@ChiragAgg5k
Copy link
Member

@ChiragAgg5k ChiragAgg5k commented Oct 30, 2025

This PR contains updates to the Apple SDK for version 13.3.1.

@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Warning

Rate limit exceeded

@ChiragAgg5k has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between a90938d and 83f2746.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)

Walkthrough

This pull request releases version 13.3.1 of the SDK, which includes a bug fix and documentation updates. The version is incremented across the CHANGELOG, README, and SDK header. The main functional change modifies the WebSocketClient to trigger the onOpen callback after the handler is added during the upgrade pipeline. Additionally, a new scheduled enum case is added to ExecutionStatus with corresponding documentation updates. Multiple documentation examples are updated to use typed Permission objects instead of raw string arrays for the permissions parameter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • WebSocketClient.swift: The onOpen callback logic addition warrants careful review to ensure the callback is invoked correctly in both delegate and non-delegate code paths
  • Documentation examples: All permission parameter updates follow the same pattern (string to typed object conversion); verify the permission syntax is consistent across all updated examples
  • ExecutionStatus.swift: Confirm the new scheduled case integrates properly with any existing status handling logic

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Apple SDK update for version 13.3.1" is partially related to the changeset. It correctly references a real aspect of the change—the version bump and release documentation—but it is overly broad and does not highlight the main functional changes such as the WebSocket onOpen callback fix, the new scheduled execution status, or the permissions API documentation updates. While the title is not misleading or off-topic, it lacks the specificity needed to clearly convey the primary changes a teammate would encounter when scanning the PR history.

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: 0

🧹 Nitpick comments (1)
Sources/AppwriteEnums/ExecutionStatus.swift (1)

8-8: Consider removing redundant raw value.

The string raw value can be omitted when it matches the case name. While the current code works correctly, removing redundant raw values improves code clarity and follows Swift conventions.

Apply this diff to remove the redundant raw value:

-    case scheduled = "scheduled"
+    case scheduled

Note: This same pattern exists in other cases (lines 4-7), so you may want to apply this refactor consistently across the entire enum for uniformity.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4932e60 and a90938d.

📒 Files selected for processing (14)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • Sources/Appwrite/Client.swift (1 hunks)
  • Sources/Appwrite/WebSockets/WebSocketClient.swift (1 hunks)
  • Sources/AppwriteEnums/ExecutionStatus.swift (1 hunks)
  • Sources/AppwriteModels/Execution.swift (1 hunks)
  • docs/examples/databases/create-document.md (1 hunks)
  • docs/examples/databases/update-document.md (1 hunks)
  • docs/examples/databases/upsert-document.md (1 hunks)
  • docs/examples/storage/create-file.md (1 hunks)
  • docs/examples/storage/update-file.md (1 hunks)
  • docs/examples/tablesdb/create-row.md (1 hunks)
  • docs/examples/tablesdb/update-row.md (1 hunks)
  • docs/examples/tablesdb/upsert-row.md (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
Sources/Appwrite/WebSockets/WebSocketClient.swift (1)
Sources/Appwrite/Services/Realtime.swift (2)
  • onOpen (38-40)
  • onOpen (208-212)
🪛 SwiftLint (0.57.0)
Sources/AppwriteEnums/ExecutionStatus.swift

[Warning] 8-8: String enum values can be omitted when they are equal to the enumcase name

(redundant_string_enum_value)

🔇 Additional comments (13)
README.md (1)

34-34: LGTM! Version reference updated correctly.

The Swift Package Manager dependency version has been updated to 13.3.1, which is consistent with the SDK version bump across the PR.

Sources/Appwrite/Client.swift (1)

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

The x-sdk-version header has been updated to 13.3.1, which is consistent with the version bump across the PR.

CHANGELOG.md (1)

3-5: LGTM! Changelog entry accurately describes the fix.

The changelog entry clearly documents the fix for the onOpen callback issue in WebSocket connections, which aligns with the changes in WebSocketClient.swift.

Sources/AppwriteModels/Execution.swift (1)

50-50: LGTM! Documentation updated to reflect new status value.

The documentation correctly includes "scheduled" in the list of possible execution statuses, which aligns with the new ExecutionStatus.scheduled enum case added in ExecutionStatus.swift.

Sources/Appwrite/WebSockets/WebSocketClient.swift (1)

300-306: LGTM! The onOpen callback fix is correctly implemented.

The modification ensures that the onOpen callback is invoked after the WebSocket handler is successfully added to the pipeline. The implementation correctly:

  1. Uses .map to chain the callback after the handler is added
  2. Respects the delegate pattern by checking for a delegate first
  3. Executes on the EventLoop thread, which is appropriate for SwiftNIO-based WebSocket handling

This fix addresses the issue described in the changelog where the onOpen callback was not being called during WebSocket connection establishment.

docs/examples/tablesdb/upsert-row.md (1)

14-14: Documentation example updated to use typed permissions API.

The permissions parameter is now using Permission.read(Role.any()) instead of raw strings, providing better type safety in the example. This aligns with the SDK's migration to typed permissions across all examples.

docs/examples/storage/create-file.md (1)

13-13: Documentation example updated consistently with storage API.

The permissions parameter now uses the typed Permission API, maintaining consistency with other documentation examples in this release.

docs/examples/databases/upsert-document.md (1)

14-14: Documentation permissions parameter updated to use typed API.

Change maintains consistency with the broader documentation migration to typed permissions across databases, storage, and table examples.

docs/examples/storage/update-file.md (1)

13-13: Permissions parameter updated in storage update example.

The typed Permission.read(Role.any()) API is now used consistently with the create-file example and other documentation across the SDK.

docs/examples/tablesdb/update-row.md (1)

14-14: Permissions parameter aligned with typed Permission API.

The tablesdb update example now consistently uses Permission.read(Role.any()) across all row operation examples.

docs/examples/databases/update-document.md (1)

14-14: Database update example now uses typed permissions API.

The permissions parameter is updated to match the create and upsert document examples, ensuring consistency across all database operation documentation.

docs/examples/databases/create-document.md (1)

20-20: Documentation example updated to use typed permissions consistently.

All three database operation examples (create, update, upsert) now uniformly use the Permission.read(Role.any()) API for permissions.

docs/examples/tablesdb/create-row.md (1)

20-20: Permissions parameter correctly updated in tablesdb create example.

Verification confirms all documentation examples consistently use the typed Permission and Role APIs—no old-style string-based permissions found across any docs/examples files. Both Permission and Role are properly exported as public classes in the Swift SDK.

@abnegate abnegate merged commit 481231c into main Oct 30, 2025
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.

3 participants