Skip to content

feat: [SDK-4728] add no-location demo app#1954

Merged
fadi-george merged 4 commits into
mainfrom
fadi/sdk-4728
Jun 9, 2026
Merged

feat: [SDK-4728] add no-location demo app#1954
fadi-george merged 4 commits into
mainfrom
fadi/sdk-4728

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Adds a runnable examples/demo-no-location app that demonstrates push usage without the OneSignal location module.

Details

Motivation

The disable-location module flags are easier to validate and document with a small runnable app that excludes location permissions and allows manual testing of push behavior.

Scope

This stacked PR adds only the demo app changes on top of the core disable-location support PR:

  • Adds a lightweight React Native no-location demo app.
  • Enables $OneSignalDisableLocation = true and OneSignal_disableLocation=true in the demo native projects.
  • Removes app location permissions and app-extension linkage from the demo build path.
  • Adds UI for requesting notification permission, sending a test push, and probing the disabled location call path.

Testing

Unit testing

No unit tests were added for the demo app.

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 iOS Pod lock / XCFramework inputs do not include OneSignalLocation.
  • Verified Android logs show the expected missing location module message when tapping TEST LOCATION REQUEST.

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:46

@sherwinski sherwinski 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.

Confirmed that the error gets emitted in logcat but the app doesn't crash:

06-09 14:21:35.283 E OneSignal: OneSignal location module is not available. Add the location dependency to use OneSignal.Location.
06-09 14:21:35.283 E OneSignal: java.lang.Exception: Must include gradle module com.onesignal:Location ...
  at ...MisconfiguredLocationManager.requestPermission(MisconfiguredLocationManager.kt:16)
  at ...RNOneSignal.requestLocationPermission(RNOneSignal.java:332)

Base automatically changed from fadi/sdk-4728-disable-location-module to main June 9, 2026 21:58
@fadi-george fadi-george force-pushed the fadi/sdk-4728 branch 2 times, most recently from 854e446 to 9b8b89c Compare June 9, 2026 22:09
@fadi-george fadi-george merged commit e74738d into main Jun 9, 2026
8 checks passed
@fadi-george fadi-george deleted the fadi/sdk-4728 branch June 9, 2026 22:09
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