Skip to content

chore: [SDK-5801] default Capacitor demos to the shared example app - #89

Merged
fadi-george merged 5 commits into
mainfrom
fadi/sdk-5801
Nov 23, 2026
Merged

fadi-george merged 5 commits into
mainfrom
fadi/sdk-5801

Conversation

@fadi-george

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Capacitor 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 demos also required an app ID in .env before they would build.

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 VITE_ONESIGNAL_APP_ID no longer fails the build; the default is used instead.
  • examples/demo and examples/demo-pods:
    • iOS reads DEMO_BUNDLE_ID / DEMO_TEAM_ID from ios/demo.xcconfig, with an optional gitignored ios/local.xcconfig override. Extension and app group IDs derive from DEMO_BUNDLE_ID.
    • Android reads -PDEMO_BUNDLE_ID (default com.onesignal.example); package_name and custom_url_scheme follow it.
  • E2E: e2e.yml passes DEMO_BUNDLE_ID=com.onesignal.sdkdemo DEMO_TEAM_ID=DL8TF3X4K3 to xcodebuild and -PDEMO_BUNDLE_ID=com.onesignal.sdkdemo to Gradle, so the e2e app, profiles and google-services.json are unchanged.
  • demo-cap7 and demo-no-location: not built by e2e, so the new IDs and app ID are set directly.
  • Not changed: Android namespace, ExportOptions.plist, and the enterprise release profiles. capacitor.config.ts appId is only used by cap add, so e2e doesn't need to override it.

Follow-ups

  • The default app needs APNs and FCM credentials for com.onesignal.example.
  • sdk-shared run-local doesn't pass the DEMO_BUNDLE_ID overrides yet (SDK-5811), so local e2e builds com.onesignal.example until then.

Testing

Manual testing

  • xcodebuild -showBuildSettings resolves the default IDs, the e2e override and the local.xcconfig override for every target.
  • Debug APKs report com.onesignal.example by default and com.onesignal.sdkdemo with -PDEMO_BUNDLE_ID.
  • Builds with no .env include the default app ID; vp check passes in the changed demos.
  • Local Appium run of examples/demo against the default app with sdk-shared run-local.sh:
    • iOS: 36/36 passing.
    • Android: specs 01-09 and 12_activity passed. 10_event, 11_location and 13_notification_click failed while UiAutomator2 kept stopping on a new emulator; not yet compared with main.

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

fadi-george and others added 5 commits November 19, 2026 12:28
….example

Bundle IDs, team and app group now come from DEMO_BUNDLE_ID/DEMO_TEAM_ID in
ios/demo.xcconfig, with an optional gitignored local.xcconfig override. The
e2e workflow passes com.onesignal.sdkdemo/DL8TF3X4K3 to keep using the
enterprise profiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the build-time check for VITE_ONESIGNAL_APP_ID and fall back to the
default app so the demo builds without a .env.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gnal.example

applicationId comes from the DEMO_BUNDLE_ID Gradle property; the e2e
workflow passes com.onesignal.sdkdemo to match its google-services.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le app

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fadi-george
fadi-george requested a review from a team November 23, 2026 20:12
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