You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If the file `examples/demo/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift` already exists, replace its contents with the shared reference implementation at `https://raw.githubusercontent.com/OneSignal/sdk-shared/main/demo/LiveActivity.swift`
306
307
307
-
API key setup:
308
+
Environment / API key setup:
308
309
309
-
- Store REST API key in `.env` file (e.g. `ONESIGNAL_API_KEY=your_rest_api_key`)
310
-
- Provide `.env.example` with placeholder value
310
+
-`.env` file with two variables:
311
+
-`ONESIGNAL_APP_ID=your-onesignal-app-id` (overrides default app ID; falls back to default if empty or missing)
312
+
-`ONESIGNAL_API_KEY=your-onesignal-api-key` (required for Live Activity update/end)
313
+
-`E2E_MODE=true` (optional, masks sensitive IDs in the UI for deterministic Appium screenshots)
314
+
- Provide `.env.example` with placeholder values and a comment noting the default app ID
311
315
- Add `.env` to `.gitignore`
312
316
-`hasApiKey()` on the API service checks that the key is present and not the placeholder
313
317
314
318
### Prompt 2.15 - Secondary Screen
315
319
316
-
Launched by "Next Screen" button at bottom of main screen:
320
+
Launched by "NEXT SCREEN" button at bottom of main screen:
317
321
318
322
- Title: "Secondary Screen"
319
323
- Centered large headline text "Secondary Screen"
@@ -373,7 +377,7 @@ SectionCard has optional info icon -> onInfoTap callback -> shows TooltipDialog
373
377
374
378
### Persisted (local storage)
375
379
376
-
PreferencesService: App ID, consent required, privacy consent, external user ID, location shared, IAM paused.
380
+
PreferencesService: consent required, privacy consent, external user ID, location shared, IAM paused. App ID is read from `.env` (not persisted in preferences).
377
381
378
382
### Initialization Flow
379
383
@@ -412,6 +416,75 @@ All dialog fields EMPTY by default. Appium enters:
412
416
413
417
Add Multiple dialogs use the same values for the first row and support multiple rows.
Use the platform's accessibility/test ID mechanism (e.g. `Semantics(identifier:)` in Flutter, `accessibilityIdentifier` in iOS, `testID` in React Native). These identifiers allow Appium to locate elements reliably.
422
+
423
+
**Scroll view**: `main_scroll_view`
424
+
425
+
**Section containers**: Each section has `{sectionKey}_section` wrapping it. Info icons have `{sectionKey}_info_icon`.
-**SectionCard**: card with title, optional info icon, content slot, onInfoTap callback, optional `sectionKey` for accessibility identifiers (generates `{sectionKey}_section` on the container and `{sectionKey}_info_icon` on the info button)
-**ActionButton**: PrimaryButton (filled) and DestructiveButton (outlined, for secondary/destructive actions), full-width, per styles.md. Both accept optional `semanticsLabel` for accessibility identifier.
513
+
-**ListWidgets**: PairItem (key-value + optional delete), SingleItem (value + delete), EmptyState, CollapsibleList (5 items then expandable), PairList. All list widgets accept a required `sectionKey` for generating accessibility identifiers (e.g. `{sectionKey}_pair_key_{keyText}`, `{sectionKey}_remove_{keyText}`).
441
514
-**LoadingOverlay**: full-screen spinner overlay per styles.md
442
-
-**Dialogs**: all full-width with consistent padding
515
+
-**Dialogs**: all full-width with consistent padding. Dialogs accept optional semantics label parameters for key inputs and confirm buttons (e.g. `keySemanticsLabel`, `valueSemanticsLabel`, `confirmSemanticsLabel`).
443
516
- SingleInputDialog, PairInputDialog (same row), MultiPairInputDialog (dynamic rows, dividers, X to delete, batch submit), MultiSelectRemoveDialog (checkboxes, batch remove)
Feedback messages are shown directly from the UI layer (not centralized in the state management layer). Use a `BuildContext` extension or helper that calls the platform's transient message API (SnackBar/Toast). The extension should hide the current message before showing a new one. Show snackbars from UI widget callbacks after awaiting the action, using a context-mounted check before displaying.
479
546
480
-
Use the platform's accessibility/test ID mechanism.
547
+
Only the following actions show snackbar feedback from the UI:
481
548
482
-
### Prompt 8.7 - Feedback Messages
549
+
- Login/Logout: "Logged in as {userId}" / "User logged out"
All actions show brief feedback via platform's transient message (SnackBar/Toast):
485
-
486
-
- Login/Logout: "Logged in as: {userId}" / "Logged out"
487
-
- Add/remove items: "Alias added: {label}", "{count} alias(es) added", etc.
488
-
- Notifications: "Notification sent: {type}" / "Failed to send notification"
489
-
- IAM: "Sent In-App Message: {type}"
490
-
- Outcomes: "Outcome sent: {name}"
491
-
- Events: "Event tracked: {name}"
492
-
- Live Activities: "Started Live Activity: {activityId}", "Updated Live Activity: {activityId}", "Ended Live Activity: {activityId}" / "Failed to update Live Activity" / "Failed to end Live Activity"
493
-
494
-
Clear previous message before showing new. All messages also logged via LogManager.i().
554
+
All other actions (add/remove items, notifications, IAM, live activities, etc.) use `debugPrint()` / console logging only -- no snackbar. The state management layer should NOT hold snackbar state or expose snackbar messages. Use `debugPrint()` for all internal logging instead of a custom LogManager.
Default app id: `77e32082-ea27-42e3-a898-c72e141824ef` (used when `ONESIGNAL_APP_ID` env var is empty or missing)
561
+
562
+
App ID is loaded from the `.env` file's `ONESIGNAL_APP_ID` variable at startup, NOT from local preferences. If the env var is empty or absent, fall back to the default app ID above.
501
563
502
564
REST API key is NOT required for the fetchUser endpoint.
0 commit comments