Skip to content

docs: correct async getters and removable observer examples - #1987

Merged
fadi-george merged 2 commits into
OneSignal:mainfrom
OskarEichler:codex/onesignal-migration-examples
Sep 1, 2026
Merged

docs: correct async getters and removable observer examples#1987
fadi-george merged 2 commits into
OneSignal:mainfrom
OskarEichler:codex/onesignal-migration-examples

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Use current asynchronous subscription getters, retain callback references for removal, fix the removeAliases syntax, and replace removed in-app-message handler APIs with addEventListener examples.

Compatibility and observable changes

Documentation only; no runtime behavior changes. The guide remains a v4-to-v5 migration reference rather than a promise of full latest-version API coverage.

Details

Motivation

The source audit reproduced the failure paths described below. This PR contains only the associated fix; unrelated audit changes are in separate PRs.

Scope

  • MIGRATION_GUIDE.md

Testing

Six extracted migration snippets type-check against current SDK declarations; the baseline has five missing-reference, syntax, or obsolete-method errors.

Each code/tooling fix was also applied independently to upstream commit a70312207cf094ac361eaa9196c317acb175c2cd and passed its targeted external actual-source diagnostics. Documentation snippets were checked separately. Native diagnostic harnesses use bridge/SDK doubles and are not an end-to-end push test.

On the combined audit branch:

  • Existing SDK suite: 5 files, 262 tests pass; unchanged 95% coverage thresholds pass.
  • vp check: formatting, lint and type checks pass; native Spotless check passes.
  • Both example apps: Android Debug and unsigned iOS Simulator builds pass.
  • Both example apps: iOS and Android production Metro bundles pass.

No checked-in test files were added or modified; regression evidence comes from external diagnostic harnesses and the existing suite. No physical-device, live notification delivery, Appium/BrowserStack, or release-workflow execution is claimed. The no-location example's stale native lock was updated locally to resolve the current SDK for verification; generated locks are not part of this PR.

Checklist

  • Required description sections completed.
  • Scope and observable/API behavior explained.
  • Diff reviewed and targeted regression checks run.
  • Automated checks and device-testing limitations documented.

@OskarEichler
OskarEichler requested a review from a team as a code owner August 27, 2026 23:47
OskarEichler and others added 2 commits August 31, 2026 17:25
The API table implied a single setter; document all four additive listeners.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george force-pushed the codex/onesignal-migration-examples branch from a3607ba to b9c64f7 Compare September 1, 2026 00:26
@fadi-george
fadi-george merged commit 8b3371d into OneSignal:main Sep 1, 2026
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.

2 participants