Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/setup-ios-demo-codesigning/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion appium/scripts/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion appium/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
2 changes: 1 addition & 1 deletion appium/scripts/download_profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
19 changes: 10 additions & 9 deletions appium/scripts/generate_profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';
Expand Down Expand Up @@ -174,7 +175,7 @@ const apiDelete = (path: string): Promise<unknown> => apiRequest<unknown>('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(
Expand Down
6 changes: 3 additions & 3 deletions appium/scripts/run-local/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion appium/tests/helpers/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion appium/wdio.android.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion demo/adjust.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The other emulator is the SDK demo.
Assign them to variables for the steps below:

REF=<emulator-with-com.onesignal.sdktest>
SDK=<emulator-with-com.onesignal.example>
SDK=<emulator-with-com.onesignal.sdkdemo>

(Replace with the actual emulator names from `adb devices`.)
```
Expand Down
4 changes: 2 additions & 2 deletions demo/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Loading