Skip to content

chore: [SDK-4788] add local notification compatibility workaround - #192

Merged
fadi-george merged 6 commits into
mainfrom
fadi/sdk-4788-fix-0
Jul 22, 2026
Merged

chore: [SDK-4788] add local notification compatibility workaround#192
fadi-george merged 6 commits into
mainfrom
fadi/sdk-4788-fix-0

Conversation

@fadi-george

@fadi-george fadi-george commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Add an iOS compatibility workaround demonstrating OneSignal alongside Plugin.LocalNotification without the selector crash reported in issue #132.

Details

Motivation

Plugin.LocalNotification installs a notification-center delegate that does not expose the OneSignal-prefixed selectors used during iOS method swizzling. This example adds a delegate shim to prevent that crash while OneSignal does not yet provide first-party local notification support.

Scope

  • Register an iOS delegate shim that exports the OneSignal-prefixed selectors.
  • Preserve plugin handling for local notifications and display remote pushes in the foreground.
  • Add a simple OneSignal push action and clearer app ID setup to the example.
  • Document the workaround, its lifecycle-event limitations, and future replacement by first-party support.
  • No SDK public API changes.

Testing

Unit testing

No unit tests were added because this is an example-level iOS delegate integration.

Manual testing

Tested locally via ./run-ios.sh or ./run-android.sh

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Physical-device testing was not performed in this session.

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

Made with Cursor

@fadi-george
fadi-george requested a review from a team as a code owner July 21, 2026 22:23
@fadi-george fadi-george changed the title fix: [SDK-4788] add local notification compatibility workaround chore: [SDK-4788] add local notification compatibility workaround Jul 21, 2026
Comment thread examples/plugin-local-notif/MainPage.cs
Comment thread examples/plugin-local-notif/MainPage.cs Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george requested a review from sherwinski July 21, 2026 23:20

@nan-li nan-li 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.

ok as an example workaround

@fadi-george
fadi-george merged commit 79dc589 into main Jul 22, 2026
6 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-4788-fix-0 branch July 22, 2026 00:06
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