Skip to content

chore: [SDK-5805] default Flutter demos to the shared example app - #1207

Merged
fadi-george merged 1 commit into
mainfrom
fadi/sdk-5805
Nov 24, 2026
Merged

fadi-george merged 1 commit into
mainfrom
fadi/sdk-5805

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

One Line Summary

Flutter demos build and run against the shared OneSignal example app out of the box, while e2e keeps using com.onesignal.sdkdemo.

Motivation

com.onesignal.sdkdemo is registered to the enterprise team (DL8TF3X4K3), so nobody outside it can sign the demo, and a bundle ID can only belong to one team. The demo also wouldn't build without a .env and threw at startup without an app ID. Same change as OneSignal/OneSignal-Capacitor-SDK#89 and OneSignal/OneSignal-Cordova-SDK#1226.

Scope

Applies to demo, demo-pods, demo-no-location and demo-no-location-pods. flutter-local-notif is unchanged.

  • Defaults: iOS bundle ID com.onesignal.example on team 99SW8E36CT, Android package com.onesignal.example, app ID 1154c350-e715-4b71-a58b-1b84b6745baa.
  • iOS: ios/demo.xcconfig is the project-level base configuration and sets DEMO_BUNDLE_ID / DEMO_TEAM_ID. Bundle IDs, teams and app groups derive from them. It optionally includes a gitignored local.xcconfig for your own team.
  • E2E on iOS: flutter build can't pass Xcode build settings, so demo and demo-pods also include a gitignored ios/e2e.xcconfig. CI writes it with com.onesignal.sdkdemo / DL8TF3X4K3 before flutter build ipa. ExportOptions.plist and the enterprise profiles are unchanged.
  • Android: applicationId comes from -PDEMO_BUNDLE_ID (default com.onesignal.example); CI passes com.onesignal.sdkdemo. The namespace is unchanged.
  • Env file moves to env/.env: pubspec.yaml now bundles the env/ folder, which is tracked with a .gitkeep. A listed .env file that doesn't exist fails the build; an empty folder doesn't. An empty or missing ONESIGNAL_APP_ID falls back to the default app. Existing local .env files need to move to env/.env.
  • CI: create-demo-env writes examples/demo/env/.env.

Notes

  • sdk-shared run-local.sh needs the matching change (SDK-5811) to write env/.env and e2e.xcconfig; it falls back to the root .env for older branches.
  • The default app needs APNs and FCM credentials for com.onesignal.example.
  • Will conflict with the SPM-only work (SDK-5823) in the pods demos.

Testing

  • xcodebuild -showBuildSettings resolves com.onesignal.example / 99SW8E36CT for every target in demo, demo-pods and demo-no-location-pods. With e2e.xcconfig, demo resolves com.onesignal.sdkdemo / DL8TF3X4K3 with the "Appium Demo" profiles. demo-no-location doesn't resolve SPM packages on main either (it pins onesignal-xcframework 5.5.5 exactly), so it wasn't checked.
  • Debug APKs report com.onesignal.example by default and com.onesignal.sdkdemo with -PDEMO_BUNDLE_ID.
  • flutter build apk succeeds with no env/.env.
  • flutter analyze: no new issues (one existing unused-import note in demo and demo-pods).
  • Local Appium run (iOS simulator, sdk-shared run-local.sh with SDK-5811): app installed as com.onesignal.sdkdemo and 01_user passed.

Affected code checklist

  • Notifications
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

  • PR does one thing
  • Tested locally (see Testing)
  • CI e2e passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george merged commit 5049f20 into main Nov 24, 2026
2 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5805 branch November 24, 2026 00:50
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