Skip to content

chore: [SDK-5810] default .NET demos to the shared example app - #223

Merged
fadi-george merged 3 commits into
mainfrom
fadi/sdk-5810
Nov 24, 2026
Merged

fadi-george merged 3 commits into
mainfrom
fadi/sdk-5810

Conversation

@fadi-george

Copy link
Copy Markdown
Contributor

Description

One Line Summary

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

Details

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 failed to build without an app ID in .env. Same change as OneSignal/OneSignal-Capacitor-SDK#89, OneSignal/OneSignal-Cordova-SDK#1226 and OneSignal/OneSignal-Flutter-SDK#1207.

Scope

  • Defaults: iOS bundle ID com.onesignal.example on team 99SW8E36CT, Android package com.onesignal.example, app ID 1154c350-e715-4b71-a58b-1b84b6745baa. A missing ONESIGNAL_APP_ID no longer fails the build.
  • examples/demo/demo.props (imported by demo.csproj and the NSE):
    • Sets DEMO_BUNDLE_ID and DEMO_TEAM_ID; MSBuild forwards -p: overrides to the NSE.
    • Adds the group.$(DEMO_BUNDLE_ID).onesignal app group as a CustomEntitlements item.
  • IDs: ApplicationId is $(DEMO_BUNDLE_ID) / $(DEMO_BUNDLE_ID).NSE. Removed the hardcoded CFBundleIdentifier from Info.plist (it overrode ApplicationId) and package= from the Android manifests.
  • Signing: device builds sign with $(DEMO_TEAM_ID). Device builds of com.onesignal.sdkdemo keep the enterprise In House signing and aps-environment = production.
  • Widget: the committed Live Activity .appex is an ad hoc simulator build with ID com.onesignal.sdkdemo.LA, and iOS won't install an extension whose ID doesn't start with the app's. A new MatchDemoWidgetBundleId target bundles a copy with the ID set to $(ApplicationId).LA and re-signed ad hoc for simulator builds. It restages every build so switching IDs can't leave a stale copy. E2E device builds still replace it with the xcodebuild widget.
  • CI: e2e.yml passes -p:DEMO_BUNDLE_ID=com.onesignal.sdkdemo (and -p:DEMO_TEAM_ID=DL8TF3X4K3 on iOS).
  • demo-no-location: uses com.onesignal.example, team 99SW8E36CT and the default app ID. It isn't built by e2e, so it no longer uses the enterprise profile.

OPTIONAL - Other

  • A default device build still needs a device build of the widget; the committed one is simulator-only, as before.
  • The widget's Xcode project stays on com.onesignal.sdkdemo.LA, since CI only uses it for the e2e device build.
  • sdk-shared run-local.sh needs the matching change (SDK-5811) to pass DEMO_BUNDLE_ID.
  • The default app needs APNs and FCM credentials for com.onesignal.example.

Testing

Manual testing

  • Simulator, default IDs: the app, NSE and widget are com.onesignal.example, .NSE and .LA. The app group entitlement is group.com.onesignal.example.onesignal for the app and NSE, and the app installs. After an e2e build, switching back to the defaults rebuilds the widget correctly.
  • Signing properties (dotnet msbuild -getProperty): default device builds get team 99SW8E36CT with no fixed profile. E2E device builds get DL8TF3X4K3 with "Appium Demo - Main" / "Appium Demo - NSE".
  • Android: debug APKs are com.onesignal.example by default and com.onesignal.sdkdemo with the override.
  • Appium: local run (iOS simulator, sdk-shared run-local.sh with SDK-5811) installed com.onesignal.sdkdemo with matching extensions and 01_user passed.
  • CSharpier passes.

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

🤖 Generated with Claude Code

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 23, 2026 23:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Incremental builds kept the previous application-identifier entitlement,
so switching to the E2E bundle ID hid the app from Web Inspector.

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