Skip to content

chore: [SDK-5084] remove unsupported iOS compatibility code - #1726

Merged
fadi-george merged 5 commits into
mainfrom
fadi/sdk-5084
Aug 27, 2026
Merged

chore: [SDK-5084] remove unsupported iOS compatibility code#1726
fadi-george merged 5 commits into
mainfrom
fadi/sdk-5084

Conversation

@fadi-george

@fadi-george fadi-george commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Remove obsolete compatibility code for iOS versions below the SDK's iOS 12 minimum.

Details

Motivation

The SDK no longer supports iOS versions below 12, leaving runtime checks, fallbacks, selectors, constants, tests, and comments that cannot apply to supported devices.

Scope

  • Removes unreachable notification, IAM, location, jailbreak-detection, and app-termination compatibility paths.
  • Removes unused iOS-version helpers, a no-op notification callback, and a deprecated Notification Service Extension overload.
  • Removes an unreferenced legacy SwiftPM header while retaining the active SwiftPM package and supported NSE APIs.
  • Flattens safe-area handling that is always available on supported versions.
  • Stabilizes user-operation tests by explicitly controlling queue flushing and waiting for asynchronous executor cleanup.
  • Retains legacy notification payload parsing because it is server-payload compatibility, not OS-version compatibility.

Other

The removed Objective-C selectors were publicly visible but undocumented and unused internally. Distribution XCFramework headers are regenerated by the release process rather than edited manually.

Testing

Unit testing

Updated existing operation batching and subscription race tests to remove timing assumptions and prevent asynchronous work from leaking between tests.

Manual testing

  • Rebuilt the required OneSignalKMP XCFramework.
  • Built the UnitTestApp test bundle for an iOS simulator.
  • Ran UnitTestApp_TestPlan_Reduced successfully on an iOS simulator.
  • Stress-ran the affected flaky tests successfully.
  • Confirmed removed symbols have no remaining source references.

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

fadi-george and others added 2 commits August 25, 2026 15:03
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george requested a review from nan-li August 25, 2026 22:57

@nan-li nan-li left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

most of my questions are around removing the outdated methods themselves. We've removed comments about being used on old iOS versions but we still kept them around and we lose that clarity, or we should get rid of the API if it is no longer applicable

Comment thread iOS_SDK/OneSignalSDK/OneSignalExtension/OneSignalExtension.h Outdated
Comment thread iOS_SDK/OneSignalSDK/OneSignalCore/Source/OSNotification.m Outdated
Comment thread iOS_SDK/OneSignalSDK/Source/OneSignal.m Outdated
Comment thread iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h
Comment thread iOS_SDK/OneSignalSDK/Source/UIApplicationDelegate+OneSignal.m
Comment thread iOS_SDK/OneSignalSDK/SwiftPM/Public/Headers/OneSignal/OneSignal.h Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george merged commit 370b087 into main Aug 27, 2026
4 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5084 branch August 27, 2026 16:42
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