Skip to content

fix(apple,dotnet,swift,cli): push_received dedupe, doc examples and Go SDK v7.20.0 - #2231

Merged
ChiragAgg5k merged 4 commits into
mainfrom
fix/apple-push-received-dedupe
Nov 16, 2026
Merged

ChiragAgg5k merged 4 commits into
mainfrom
fix/apple-push-received-dedupe

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Three fixes from review on the 2.7.2 SDK release PRs (appwrite/sdk-for-apple#136, appwrite/sdk-for-dotnet#117, appwrite/sdk-for-swift#84).

Apple: push_received dedupe. Push.firstTracked recorded the key before the received path checked for a tracker. An untracked Push that handled a delivery first took the key, so the tracked one never sent push_received.

let tracking = sync.sync { self.tracking }
if let tracking,
    (shown || notification.visible) && matched.contains(where: { $0.background }),
    Push.firstTracked("received\n…")

This matches the opened path and the Flutter and React Native templates. No test covers it: deliver is private and needs live push subscriptions.

.NET examples. A method with no response model rendered Appwrite.Models. result = …. It now renders object result, matching Task<object>. This affects oauth2.revoke, project.createSMTPTest and project.createLDAPTest.

Swift examples. When the result model shared the service's name, the example redeclared the service variable: let project = try await project.get(). Those examples now use result. This affects 26 examples on main (project.*, locale.get, organization.*).

before after
.NET Appwrite.Models. result = await project.CreateLDAPTest( object result = await project.CreateLDAPTest(
Swift let project = try await project.updateLDAP( let result = try await project.updateLDAP(

Verified by regenerating the server .NET and Swift SDKs against the 2.7.x spec: no broken declarations remain. swift build passes on the patched Apple SDK.

CLI. go.mod.twig pins Go SDK v7.20.0, which adds CreateLDAPSession, UpdateLDAP and CreateLDAPTest. The generated CLI fails to build on v7.19.0; on v7.20.0, go build and go vet pass.

Related: appwrite-labs/cloud#6667

An untracked Push that got the same delivery first recorded the key, so the tracked instance never sent push_received. The opened path and the Flutter and React Native templates already check tracking first.
@appwrite

appwrite Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The new generation assertions exercise the intended Swift and .NET example output, and I found no defect in the incremental changes.

The pull request adjusts Apple push-received deduplication, .NET and Swift generated example declarations, and the Go SDK version used by the CLI. It also adds generation regression coverage for Swift service/result name collisions and .NET methods without a response model.

Latest changes: The newest commit extends the inline generation fixture with a colliding Swift model/service and a response-less .NET operation, then asserts the generated examples use result and object result respectively.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 5
File Change
templates/apple/Sources/Services/Push.swift.twig Only claims the push_received dedupe key after push tracking is confirmed.
templates/cli/go.mod.twig Pins the generated CLI module to Go SDK v7.20.0.
templates/dotnet/docs/example.md.twig Uses object for examples whose methods have no response model.
templates/swift/docs/example.md.twig Uses result when the response model name would collide with the service variable.
tests/generation/GenerationTest.php Adds generated-example regression assertions for Swift name collisions and .NET response-less methods.

Reviewed the commits since 627f2a0 · Details · Comment @appwrite review to re-run, or mention @appwrite with a question.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

…name results

A .NET example for a method with no response model declared 'Appwrite.Models. result'; it now uses object, matching Task<object>. A Swift example whose result model shares the service's name (project.get, locale.get) redeclared the service variable; it now names the result 'result'.
@ChiragAgg5k ChiragAgg5k changed the title fix(apple): claim the push_received dedupe key only on a tracked Push fix(apple,dotnet,swift): push_received dedupe and non-compiling doc examples Nov 16, 2026

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · Looks good to merge. Summary

Comment thread templates/dotnet/docs/example.md.twig Resolved
v7.20.0 adds CreateLDAPSession, UpdateLDAP and CreateLDAPTest, which the CLI commands for those endpoints call.
@ChiragAgg5k ChiragAgg5k changed the title fix(apple,dotnet,swift): push_received dedupe and non-compiling doc examples fix(apple,dotnet,swift,cli): push_received dedupe, doc examples and Go SDK v7.20.0 Nov 16, 2026
The identifier fixture gains a no-content method and a model named after its service; both assertions fail on the previous templates.

@appwrite appwrite Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit b179934 into main Nov 16, 2026
102 of 103 checks passed
@ChiragAgg5k ChiragAgg5k self-assigned this Nov 17, 2026
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.

1 participant