Skip to content

chore: [SDK-5808] default Unity demos to the shared example app - #919

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

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

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Build the Unity demos as com.onesignal.example (team 99SW8E36CT) with the shared default app ID, and keep com.onesignal.sdkdemo / DL8TF3X4K3 for E2E.

Details

Motivation

Part of SDK-5802: every SDK demo should build out of the box against the shared example app, while E2E keeps the identity its signing profiles and FCM config use.

Scope

  • ProjectSettings.asset (both demo and demo-no-location): the Android and iOS bundle ID is com.onesignal.example, and appleDeveloperTeamID is 99SW8E36CT.
  • BuildScript reads -demoBundleId / -demoTeamId from the Unity command line and applies them for that build only. The original Player Settings are restored in a finally block, so the override never lands in ProjectSettings.asset.
  • SigningPostProcessor takes the team from Player Settings instead of a hard-coded DL8TF3X4K3. The NSE and widget still get <bundle>.NSE / <bundle>.LA.
  • e2e.yml passes customParameters: -demoBundleId com.onesignal.sdkdemo (plus -demoTeamId DL8TF3X4K3 on iOS) to game-ci. The xcodebuild and ExportOptions signing are unchanged.
  • App ID:
    • demo: CopyEnvPreBuild no longer fails without .env (and drops a stale StreamingAssets copy), and AppBootstrapper falls back to 1154c350-e715-4b71-a58b-1b84b6745baa.
    • demo-no-location: the scene and component default is the same app ID instead of the YOUR-ONESIGNAL-APP-ID placeholder.
  • The run-*.sh scripts, AndroidResolverDependencies.xml, the READMEs, build.md and .env.example are updated.

The matching sdk-shared run-local change, which passes -demoBundleId "$BUNDLE_ID" (and -demoTeamId on iOS), is on sdk-shared main.

Testing

Manual testing

  • Android, run-local --sdk=unity --spec=01_user: built with -demoBundleId com.onesignal.sdkdemo, installed as com.onesignal.sdkdemo, 2 of 2 passing. ProjectSettings.asset was unchanged afterwards.
  • Android, a plain BuildAndroidEmulator with no arguments and no .env: the APK is com.onesignal.example with no .env bundled. On an emulator, the SDK initialized with 1154c350-e715-4b71-a58b-1b84b6745baa.
  • iOS, run-local --sdk=unity --install-only on a simulator:
    • The app, NSE and widget are com.onesignal.sdkdemo, .NSE and .LA.
    • DEVELOPMENT_TEAM=DL8TF3X4K3 is set on all three targets.
    • The App Group is group.com.onesignal.sdkdemo.onesignal.
  • Not run: a plain iOS build with no arguments, and device archive signing (covered by E2E CI).

Push on com.onesignal.example needs APNs/FCM credentials on the default app.

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 (demo config only)
  • 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 (emulator and simulator)

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

🤖 Generated with Claude Code

Both demos default to com.onesignal.example (team 99SW8E36CT) and the
shared default app ID. BuildScript takes -demoBundleId / -demoTeamId for
E2E (com.onesignal.sdkdemo / DL8TF3X4K3) and restores the project
settings after the build. A missing .env or app ID no longer fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george requested a review from a team as a code owner November 24, 2026 20:21
@fadi-george
fadi-george merged commit 417c7b3 into main Nov 24, 2026
1 check passed
@fadi-george
fadi-george deleted the fadi/sdk-5808 branch November 24, 2026 20:41
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