镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

chore: [SDK-5691] enable Firebase Installation IDs in demo app - #2011

Merged
fadi-george merged 1 commit into
mainfrom
fadi/sdk-5691
Nov 10, 2026
Merged

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

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Rename the Android demo to com.onesignal.sdkdemo and turn on Firebase Installation ID registration for E2E builds.

Details

Motivation

E2E should cover Firebase Installation ID registration. That needs firebase-messaging 25.1.2+, the manifest flag, and a google-services.json whose client matches the app package. Same approach as OneSignal/OneSignal-Android-SDK#2836 and OneSignal/OneSignal-Capacitor-SDK#81.

Scope

  • Android package renamed to com.onesignal.sdkdemo in demo and demo-no-location. iOS stays com.onesignal.example. FID/E2E wiring is demo only.
  • firebase-messaging 25.1.3 (OneSignal alone resolves 24.x).
  • firebase_messaging_installation_id_enabled comes from -PFIREBASE_INSTALLATION_ID_ENABLED and defaults to false. The build fails if it's on without google-services.json. The Google Services plugin is applied only when the file exists.
  • google-services.json is gitignored. The Android E2E job writes it from APPIUM_GOOGLE_SERVICES_JSON with sdk-shared setup-google-services, so an empty secret fails with that action's error. iOS doesn't touch it.
  • E2E builds with the flag on and passes bundle-id: com.onesignal.sdkdemo to the Android Appium job.
  • The default app ID is removed. metro.config.js fails the bundle when ONESIGNAL_APP_ID is unset in both process.env and .env, which covers react-native start and release bundling on both platforms.

Testing

Manual testing

  • assembleRelease -PciSingleAbi -PFIREBASE_INSTALLATION_ID_ENABLED=true with a google-services.json builds. The APK has package com.onesignal.sdkdemo, the flag is true, and firebase-messaging resolves to 25.1.3.
  • Without the file or flag, the build succeeds. With the flag but no file, it fails with a clear error.
  • Without ONESIGNAL_APP_ID, loading metro.config.js throws. Setting it via process.env works.
  • vp run lint passes.
  • iOS build and E2E not run yet. E2E runs on rel/** or manual dispatch, and needs APPIUM_GOOGLE_SERVICES_JSON to have a com.onesignal.sdkdemo client.

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

Rename the Android demo package to com.onesignal.sdkdemo, apply the
Google Services plugin only when google-services.json exists, and add
firebase-messaging 25.1.3. The FID manifest flag stays off unless
-PFIREBASE_INSTALLATION_ID_ENABLED=true, which E2E sets after writing
google-services.json from the shared secret. Remove the default app id;
Metro fails the bundle when ONESIGNAL_APP_ID is unset.

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 9, 2026 23:47
@fadi-george
fadi-george merged commit 3fde392 into main Nov 10, 2026
2 checks passed
@fadi-george
fadi-george deleted the fadi/sdk-5691 branch November 10, 2026 00:37
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