From f91eaeadeb4d8c1c0116b8e34d21387db89484a8 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Wed, 21 Oct 2026 17:43:42 -0700 Subject: [PATCH] chore: [SDK-5586] use com.onesignal.sdkdemo identifiers Co-Authored-By: Claude Opus 5.5 --- .../setup-ios-demo-codesigning/action.yml | 6 +++--- appium/scripts/.env.example | 2 +- appium/scripts/README.md | 2 +- appium/scripts/download_profiles.ts | 2 +- appium/scripts/generate_profiles.ts | 19 ++++++++++--------- appium/scripts/run-local/config.sh | 6 +++--- appium/tests/helpers/app.ts | 2 +- appium/wdio.android.conf.ts | 2 +- demo/adjust.md | 2 +- demo/build.md | 4 ++-- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/actions/setup-ios-demo-codesigning/action.yml b/.github/actions/setup-ios-demo-codesigning/action.yml index 00ea1eb..8e8f2ca 100644 --- a/.github/actions/setup-ios-demo-codesigning/action.yml +++ b/.github/actions/setup-ios-demo-codesigning/action.yml @@ -20,15 +20,15 @@ inputs: main-bundle-id: description: 'Main app bundle identifier' required: false - default: 'com.onesignal.example' + default: 'com.onesignal.sdkdemo' nse-bundle-id: description: 'Notification Service Extension bundle identifier. Leave empty to skip.' required: false - default: 'com.onesignal.example.NSE' + default: 'com.onesignal.sdkdemo.NSE' widget-bundle-id: description: 'Live Activity / Widget Extension bundle identifier. Leave empty to skip.' required: false - default: 'com.onesignal.example.LA' + default: 'com.onesignal.sdkdemo.LA' profile-type: description: 'Provisioning profile type (IOS_APP_DEVELOPMENT, IOS_APP_ADHOC, IOS_APP_STORE)' required: false diff --git a/appium/scripts/.env.example b/appium/scripts/.env.example index 77eaaa9..d0fdd53 100644 --- a/appium/scripts/.env.example +++ b/appium/scripts/.env.example @@ -5,7 +5,7 @@ ONESIGNAL_API_KEY=your-api-key # ── Optional (auto-detected if not set) ────────────────────────────────────── # FLUTTER_DIR=/path/to/OneSignal-Flutter-SDK # default: ../../OneSignal-Flutter-SDK # APP_PATH=/path/to/Runner.app # default: built from FLUTTER_DIR -# BUNDLE_ID=com.onesignal.example +# BUNDLE_ID=com.onesignal.sdkdemo # ── Optional (defaults shown) ──────────────────────────────────────────────── # OS_VERSION=26.5 # iOS default; Android default: 17 diff --git a/appium/scripts/README.md b/appium/scripts/README.md index ab986a7..8692c0b 100644 --- a/appium/scripts/README.md +++ b/appium/scripts/README.md @@ -180,7 +180,7 @@ Credential files the runner writes into demo repos (`.env`, Unity's `StreamingAs | `IOS_DIR` | `../../OneSignal-iOS-SDK` | Native iOS SDK repo | | `UNITY_PATH` | Unity Hub editor path | Unity Editor binary (unity builds) | | `APP_PATH` | auto-detected from build | Path to `.app` or `.apk` | -| `BUNDLE_ID` | `com.onesignal.example` | App bundle/package ID | +| `BUNDLE_ID` | `com.onesignal.sdkdemo` | App bundle/package ID | | `DEVICE` | `iPhone 17` / `Android 17` | Device name for WebdriverIO | | `OS_VERSION` | `26.5` / `17` | Platform version | | `IOS_SIMULATOR` | same as `DEVICE` | Simulator name for `simctl` | diff --git a/appium/scripts/download_profiles.ts b/appium/scripts/download_profiles.ts index e3358aa..2f82651 100644 --- a/appium/scripts/download_profiles.ts +++ b/appium/scripts/download_profiles.ts @@ -24,7 +24,7 @@ * Usage * ----- * ASC_KEY_ID=... ASC_ISSUER_ID=... ASC_KEY_FILE=~/keys/AuthKey_XXX.p8 \ - * bun appium/scripts/download_profiles.ts com.onesignal.example com.onesignal.example.NSE + * bun appium/scripts/download_profiles.ts com.onesignal.sdkdemo com.onesignal.sdkdemo.NSE */ import { createPrivateKey, sign } from 'node:crypto'; diff --git a/appium/scripts/generate_profiles.ts b/appium/scripts/generate_profiles.ts index 067e3fb..b2e22f7 100755 --- a/appium/scripts/generate_profiles.ts +++ b/appium/scripts/generate_profiles.ts @@ -12,11 +12,12 @@ * Prerequisites * ------------- * - The bundle IDs below must already be registered in the Apple Developer - * portal as Explicit App IDs with the required capabilities (App Groups for - * both, plus Live Activities on .LA). This script does not configure - * capabilities. - * - App Store Connect API credentials from the "OneSignal Sdk-Shared Script" - * key in https://appstoreconnect.apple.com/access/integrations/api. + * portal as Explicit App IDs with the required capabilities: Push + * Notifications + App Groups on the main app, App Groups on .NSE (both + * assigned `group.com.onesignal.sdkdemo.onesignal`), none on .LA. This + * script does not configure capabilities. + * - An Admin App Store Connect API key from the OneSignal, Inc. team + * (https://appstoreconnect.apple.com/access/integrations/api). * - Bun (or `tsx`) to run the script. * * Environment variables @@ -40,9 +41,9 @@ interface ProfileTarget { } const TARGETS: ProfileTarget[] = [ - { bundleId: 'com.onesignal.example', profileName: 'Appium Demo - Main' }, - { bundleId: 'com.onesignal.example.NSE', profileName: 'Appium Demo - NSE' }, - { bundleId: 'com.onesignal.example.LA', profileName: 'Appium Demo - Live Activity' }, + { bundleId: 'com.onesignal.sdkdemo', profileName: 'Appium Demo - Main' }, + { bundleId: 'com.onesignal.sdkdemo.NSE', profileName: 'Appium Demo - NSE' }, + { bundleId: 'com.onesignal.sdkdemo.LA', profileName: 'Appium Demo - Live Activity' }, ]; const API = 'https://api.appstoreconnect.apple.com/v1'; @@ -174,7 +175,7 @@ const apiDelete = (path: string): Promise => apiRequest('DELET * Look up a bundle ID by its exact identifier. * * `filter[identifier]` on /bundleIds is a substring/prefix match (e.g., - * filtering by `com.onesignal.example` returns every bundle ID that starts + * filtering by `com.onesignal.sdkdemo` returns every bundle ID that starts * with that string). We paginate and filter client-side for an exact match. */ async function findBundleIdByExactIdentifier( diff --git a/appium/scripts/run-local/config.sh b/appium/scripts/run-local/config.sh index 0a23bd5..4421baa 100644 --- a/appium/scripts/run-local/config.sh +++ b/appium/scripts/run-local/config.sh @@ -84,7 +84,7 @@ Options: Env vars (set in .env or export): APP_PATH Path to .app/.apk (auto-detected if not set) - BUNDLE_ID Bundle/package id (default: com.onesignal.example) + BUNDLE_ID Bundle/package id (default: com.onesignal.sdkdemo) ONESIGNAL_APP_ID OneSignal app ID (written to demo app .env) ONESIGNAL_API_KEY OneSignal REST API key (written to demo app .env) FLUTTER_DIR Flutter SDK repo root (default: ../../OneSignal-Flutter-SDK) @@ -282,7 +282,7 @@ USAGE IOS_XCODE_EXTRA_ARGS="" fi - BUNDLE_ID="${BUNDLE_ID:-com.onesignal.example}" + BUNDLE_ID="${BUNDLE_ID:-com.onesignal.sdkdemo}" if [[ "$SDK_TYPE" == "flutter" ]]; then [[ -d "$FLUTTER_DIR" ]] || error "Flutter SDK not found at $FLUTTER_DIR — set FLUTTER_DIR in .env" @@ -369,7 +369,7 @@ USAGE # The build passes -p:RuntimeIdentifier, so MSBuild emits the APK into a # RID subfolder; the RID-less parent dir may hold a stale APK from a # build without the RID restriction. - APP_PATH="${APP_PATH:-$DEMO_DIR/bin/Debug/${DOTNET_TFM}-android/${DOTNET_ANDROID_RID}/com.onesignal.example-Signed.apk}" + APP_PATH="${APP_PATH:-$DEMO_DIR/bin/Debug/${DOTNET_TFM}-android/${DOTNET_ANDROID_RID}/com.onesignal.sdkdemo-Signed.apk}" fi elif [[ "$SDK_TYPE" == "unity" ]]; then [[ -d "$UNITY_DIR" ]] || error "Unity SDK not found at $UNITY_DIR — set UNITY_DIR in .env" diff --git a/appium/tests/helpers/app.ts b/appium/tests/helpers/app.ts index 0648ff0..dc42186 100644 --- a/appium/tests/helpers/app.ts +++ b/appium/tests/helpers/app.ts @@ -15,7 +15,7 @@ import { waitForPushSubscriptionReady, } from './selectors.js'; -const PACKAGE_ID = 'com.onesignal.example'; +const PACKAGE_ID = process.env.BUNDLE_ID || 'com.onesignal.sdkdemo'; const __dirname = dirname(fileURLToPath(import.meta.url)); const tooltipContent = JSON.parse( diff --git a/appium/wdio.android.conf.ts b/appium/wdio.android.conf.ts index c3a1b0a..473ffbc 100644 --- a/appium/wdio.android.conf.ts +++ b/appium/wdio.android.conf.ts @@ -2,7 +2,7 @@ import { sharedConfig, bstackOptions } from './wdio.shared.conf.js'; const isLocal = !process.env.BROWSERSTACK_USERNAME; const isDotNet = process.env.SDK_TYPE === 'dotnet'; -const appPackage = process.env.BUNDLE_ID || 'com.onesignal.example'; +const appPackage = process.env.BUNDLE_ID || 'com.onesignal.sdkdemo'; const appWaitPackages = [ appPackage, 'com.android.permissioncontroller', diff --git a/demo/adjust.md b/demo/adjust.md index 9ac1dec..0447593 100644 --- a/demo/adjust.md +++ b/demo/adjust.md @@ -26,7 +26,7 @@ The other emulator is the SDK demo. Assign them to variables for the steps below: REF= - SDK= + SDK= (Replace with the actual emulator names from `adb devices`.) ``` diff --git a/demo/build.md b/demo/build.md index b3b3de2..34ebded 100644 --- a/demo/build.md +++ b/demo/build.md @@ -21,7 +21,7 @@ Create a new {{PLATFORM}} project at `examples/demo/` (relative to the SDK repo - `AppViewModel` for .NET MAUI (C#) and Flutter - App name: "OneSignal Demo" - Top app bar: centered title with OneSignal logo SVG + "{{PLATFORM}}" text -- Android package name / iOS bundle identifier: `com.onesignal.example` +- Android package name / iOS bundle identifier: `com.onesignal.sdkdemo` - All dialogs should have EMPTY input fields (for Appium testing) - Separate widget/component files per section @@ -683,7 +683,7 @@ See each SDK's `examples/build.md` for the platform-specific helper APIs, the ex ### Identifiers -Android package name / iOS bundle identifier MUST be `com.onesignal.example` so the checked-in `google-services.json` and `agconnect-services.json` keep working without regeneration. +Android package name / iOS bundle identifier MUST be `com.onesignal.sdkdemo` to match the registered Apple App IDs, provisioning profiles, and Appium config. iOS extensions use `com.onesignal.sdkdemo.NSE` and `com.onesignal.sdkdemo.LA`, and the App Group is `group.com.onesignal.sdkdemo.onesignal`. Any checked-in `google-services.json` or `agconnect-services.json` must include a client for this package. ### REST API authentication