Skip to content

chore: [SDK-4194] add no-location Flutter demo#1158

Merged
fadi-george merged 8 commits into
mainfrom
fadi/sdk-4194-demo-no-location
Jun 10, 2026
Merged

chore: [SDK-4194] add no-location Flutter demo#1158
fadi-george merged 8 commits into
mainfrom
fadi/sdk-4194-demo-no-location

Conversation

@fadi-george

@fadi-george fadi-george commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Adds a minimal Flutter demo-no-location app stacked on the SDK-4194 location-module opt-out work.

iOS:

default	17:26:48.076411-0700	SpringBoard	RX com.onesignal.example(26079) focusApplicationWithPID:26079 stealKeyboard:Y
    context:<contextID:2107512835 sceneID:com.onesignal.example-default>
default	17:26:48.076081-0700	Runner	TX focusApplication (peekAppEvent) stealKB:Y scene:com.onesignal.example-default
default	17:26:48.775547-0700	Runner	TX focusApplication (peekAppEvent) stealKB:Y scene:com.onesignal.example-default
default	17:26:48.775859-0700	SpringBoard	RX com.onesignal.example(26079) focusApplicationWithPID:26079 stealKeyboard:Y
    context:<contextID:2107512835 sceneID:com.onesignal.example-default>
default	17:26:48.846646-0700	Runner	ERROR: OneSignalLocation not found. In order to use OneSignal's location features the OneSignalLocation module must be added.
default	17:26:48.849788-0700	Runner	flutter: OneSignal.Location.requestPermission did not throw.

Android:

I/ImeTracker(28779): com.onesignal.example:4a60fd82: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
D/OneSignal(28779): [OneSignalFlutterBg] LocationManager.requestPermission()
W/OneSignal(28779): [OneSignalFlutterBg] Requesting location permission, but location sharing must also be enabledby setting isShared to true
I/OneSignal(28779): [OneSignalFlutterBg] Location permissions not added on AndroidManifest file >= M
I/flutter (28779): OneSignal.Location.requestPermission did not throw.

Details

Motivation

Some apps use OneSignal push and in-app messages without OneSignal.Location. This demo provides a small runnable app for validating that push still works when the native OneSignal location module is excluded.

Scope

  • Adds examples/demo-no-location with minimal Flutter UI and native iOS/Android projects.
  • The demo documents running builds with ONESIGNAL_DISABLE_LOCATION=true.
  • No core SDK behavior changes are included in this PR; it is stacked on fadi/sdk-4194.

Testing

Manual testing

  • Validated the SPM manifest after restacking/fixing the branch.
  • Verified ONESIGNAL_DISABLE_LOCATION=1 swift package dump-package excludes OneSignalLocation.

Affected code checklist

  • Notifications
  • In-App Messaging

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 23:36
@fadi-george fadi-george changed the title feat: [SDK-4194] add no-location Flutter demo chore: [SDK-4194] add no-location Flutter demo Jun 9, 2026
Base automatically changed from fadi/sdk-4194 to main June 9, 2026 23:38
fadi-george and others added 2 commits June 9, 2026 16:38
Keep the normalized ONESIGNAL_DISABLE_LOCATION parser from the parent branch and remove the stale exact-match block from the demo branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george force-pushed the fadi/sdk-4194-demo-no-location branch from c0509a2 to c0dcf64 Compare June 9, 2026 23:38
fadi-george and others added 3 commits June 9, 2026 16:53
Match the main Flutter demo by loading ONESIGNAL_APP_ID from a local .env file instead of requiring a dart-define for the no-location example.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add a small run.sh wrapper that exports ONESIGNAL_DISABLE_LOCATION for Flutter runs and update the no-location demo README to use it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sherwinski

Copy link
Copy Markdown
Contributor

@claude review once

fadi-george and others added 2 commits June 9, 2026 17:16
Make the README explicitly call out setting ONESIGNAL_APP_ID in the demo .env file.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the Runner entitlements file with aps-environment and wire it into the iOS app target so the no-location demo has the same push capability setup as the React Native demo.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread examples/demo-no-location/lib/main.dart Outdated
Comment thread examples/demo-no-location/lib/main.dart Outdated
Comment thread examples/demo-no-location/pubspec.yaml
Update the no-location demo to detect the lowercase .env placeholder and point users to ONESIGNAL_APP_ID in .env instead of dart-define.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george merged commit 056ce8c into main Jun 10, 2026
6 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-4194-demo-no-location branch June 10, 2026 00:46
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