Skip to content

SDK 0.3.2: restore deprecated applyCode(JSONObject) signature - #4

Closed
KennyYe wants to merge 2 commits into
mainfrom
cursor/sdk-0-3-2-restore-applycode-ef35
Closed

KennyYe wants to merge 2 commits into
mainfrom
cursor/sdk-0-3-2-restore-applycode-ef35

Conversation

@KennyYe

@KennyYe KennyYe commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Upgrade to 0.3.2. 0.3.1 changed applyCode to (Result<JSONObject>) -> Unit, which broke source compatibility for apps on 0.3.0.

  • Restore the exact 0.3.0 signature applyCode(code, callback: (JSONObject) -> Unit) as @Deprecated.
  • On failure the deprecated overload throws TapAppLinkRedeemException on the worker thread and never delivers an error body as success (0.3.0 had no error callback).
  • Keep the typed Result API (@JvmName("applyCodeWithResult") for JVM erasure).
  • Tests: 0.3.0-style call sites compile; success and failure for both overloads.
  • CHANGELOG includes before/after migration; Android upgrade advice points to 0.3.2.

Test plan

  • ./gradlew test ktlintCheck lintRelease
  • CI green
  • Squash-merge, tag v0.3.2, confirm Release workflow
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 9, 2026 17:16
0.3.1 changed applyCode to Result and broke 0.3.0 source compatibility.
Restore the (JSONObject) -> Unit overload as @deprecated; on failure it
throws TapAppLinkRedeemException and never delivers an error body as
success. Keep the Result API (@JvmName applyCodeWithResult). Android
apps should upgrade to 0.3.2.

Co-authored-by: Kenny Ye <KennyYe@users.noreply.github.com>
Explicit Result<JSONObject> parameter matches the restored dual overloads.

Co-authored-by: Kenny Ye <KennyYe@users.noreply.github.com>
@cursor
cursor Bot deleted the cursor/sdk-0-3-2-restore-applycode-ef35 branch October 9, 2026 17:17
@KennyYe KennyYe closed this Oct 9, 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.

2 participants