Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 13.3.0

* Add `onOpen`, `onClose` and `onError` callbacks to `Realtime` service
Comment on lines +3 to +5
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.


## 13.2.2

* Fix issue: Missing AppwriteEnums dependency causing build failure
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Add the package to your `Package.swift` dependencies:

```swift
dependencies: [
.package(url: "git@github.com:appwrite/sdk-for-swift.git", from: "13.2.2"),
.package(url: "git@github.com:appwrite/sdk-for-swift.git", from: "13.3.0"),
],
```

Expand Down
2 changes: 1 addition & 1 deletion Sources/Appwrite/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ open class Client {
"x-sdk-name": "Swift",
"x-sdk-platform": "server",
"x-sdk-language": "swift",
"x-sdk-version": "13.2.2",
"x-sdk-version": "13.3.0",
"x-appwrite-response-format": "1.8.0"
]

Expand Down