Skip to content

feat: [SDK-4728] support disabling OneSignal location module#1952

Closed
fadi-george wants to merge 5 commits into
mainfrom
fadi/sdk-4728
Closed

feat: [SDK-4728] support disabling OneSignal location module#1952
fadi-george wants to merge 5 commits into
mainfrom
fadi/sdk-4728

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Adds build-time support for excluding the native OneSignal location module and includes a runnable no-location demo app.

Details

Motivation

Apps that do not use OneSignal.Location should be able to avoid linking the native location module so iOS and Android builds do not include location-related native dependencies or permissions.

Scope

This PR adds opt-out controls for the native location module:

  • iOS: $OneSignalDisableLocation = true switches CocoaPods to the non-location OneSignal subspecs.
  • Android: OneSignal_disableLocation=true switches Gradle to individual OneSignal modules without com.onesignal:location.
  • Location bridge calls degrade safely when the native location module is unavailable.
  • examples/demo-no-location demonstrates push/in-app usage without location permissions or location module linkage.

Testing

Unit testing

No new unit tests in this repo. The change is primarily native dependency selection and bridge behavior, validated through example app builds.

Manual testing

  • Ran vp run ios in examples/demo-no-location; app built and launched successfully.
  • Ran vp run android in examples/demo-no-location; app built, installed, and launched successfully.
  • Ran vp exec tsc --noEmit in examples/demo-no-location.
  • Verified the iOS Pod lock / XCFramework inputs do not include OneSignalLocation.
  • Verified Android logs report the expected missing location module message when tapping the demo's location test button.

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 fadi-george requested a review from a team as a code owner June 9, 2026 02:15
@fadi-george fadi-george requested a review from nan-li June 9, 2026 02:44
@fadi-george

Copy link
Copy Markdown
Collaborator Author

Closing in favor of split stacked PRs: one for the core disable-location support and one for the no-location demo.

@fadi-george fadi-george closed this Jun 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.

1 participant