Skip to content

fix: restore the deprecated 2-arg NSE selector - #1737

Merged
nan-li merged 2 commits into
mainfrom
fix/restore-deprecated-nse-2arg-api
Sep 8, 2026
Merged

nan-li merged 2 commits into
mainfrom
fix/restore-deprecated-nse-2arg-api

Conversation

@nan-li

@nan-li nan-li commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Put didReceiveNotificationExtensionRequest:withMutableNotificationContent: back on OneSignal and OneSignalExtension as a deprecated public wrapper.

Details

Motivation

5.6.0 removed this selector in #1726 as unsupported iOS 10 code. The "iOS 10 only" comment meant NSE's floor is iOS 10, not that the method died on 11+. Wrappers and old NotificationService files still call the 2-arg form, so 5.6.0 is a compile break in a minor.

It was deprecated in 3.5.0 (#934) because confirmed-delivery spreading needs contentHandler to keep the NSE alive after the banner shows. The 2-arg path is still the sync contract (nil handler, no receipt delay). Deprecation is not the same as removal. Drop it in 6.0, not 5.6.x.

Scope

  • Public headers and .m wrappers on OneSignal and OneSignalExtension only
  • Still deprecated, same message as before
  • Forwards to the existing handler 2-arg method, which already calls the 3-arg path with nil
  • No change to attachments, action buttons, or the contentHandler path
  • XCFramework binaries are rebuilt at release

Testing

Unit testing

None added. The internal handler never lost the 2-arg method, and that is what these wrappers call. Existing NSE handler tests cover that path.

Manual testing

Not device-tested. This restores a public selector so NSE files that still call it compile against 5.6.x. The 3-arg path is unchanged.

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

Final pass

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

Made with Cursor

nan-li and others added 2 commits September 8, 2026 15:09
5.6.0 dropped it as iOS 10 leftover. iOS 10 is the floor, and wrappers still call the sync path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@nan-li
nan-li requested a review from fadi-george September 8, 2026 22:15
@fadi-george

Copy link
Copy Markdown
Collaborator

could add tests

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