Skip to content

Commit bc7e53d

Browse files
onesignal-deploygithub-actions[bot]fadi-georgecursoragent
authored
chore: Release 1.0.3 (#19)
Co-authored-by: github-actions[bot] <noreply@onesignal.com> Co-authored-by: Fadi George <fadii925@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9c4a7c6 commit bc7e53d

12 files changed

Lines changed: 73 additions & 164 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Resolve OneSignal Android SDK version
5050
id: android-sdk-version
5151
run: |
52-
VERSION=$(grep -E '^onesignal\s*=' android/gradle/libs.versions.toml | sed -E 's/.*"([^"]+)".*/\1/')
52+
VERSION=$(grep -E '^onesignal\s*=\s*"' android/gradle/libs.versions.toml | sed -E 's/.*"([^"]+)".*/\1/')
5353
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
5454
5555
- name: Wait for OneSignal Android SDK on Maven Central

AGENTS.md

Lines changed: 6 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,14 @@
22

33
# Using Vite+, the Unified Toolchain for the Web
44

5-
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`.
5+
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
66

7-
## Vite+ Workflow
7+
Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.
88

9-
`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
10-
11-
### Start
12-
13-
- create - Create a new project from a template
14-
- migrate - Migrate an existing project to Vite+
15-
- config - Configure hooks and agent integration
16-
- staged - Run linters on staged files
17-
- install (`i`) - Install dependencies
18-
- env - Manage Node.js versions
19-
20-
### Develop
21-
22-
- dev - Run the development server
23-
- check - Run format, lint, and TypeScript type checks
24-
- lint - Lint code
25-
- fmt - Format code
26-
- test - Run tests
27-
28-
### Execute
29-
30-
- run - Run monorepo tasks
31-
- exec - Execute a command from local `node_modules/.bin`
32-
- dlx - Execute a package binary without installing it as a dependency
33-
- cache - Manage the task cache
34-
35-
### Build
36-
37-
- build - Build for production
38-
- pack - Build libraries
39-
- preview - Preview production build
40-
41-
### Manage Dependencies
42-
43-
Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles.
44-
45-
- add - Add packages to dependencies
46-
- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies
47-
- update (`up`) - Update packages to latest versions
48-
- dedupe - Deduplicate dependencies
49-
- outdated - Check for outdated packages
50-
- list (`ls`) - List installed packages
51-
- why (`explain`) - Show why a package is installed
52-
- info (`view`, `show`) - View package information from the registry
53-
- link (`ln`) / unlink - Manage local package links
54-
- pm - Forward a command to the package manager
55-
56-
### Maintain
57-
58-
- upgrade - Update `vp` itself to the latest version
59-
60-
These commands map to their corresponding tools. For example, `vp dev --port 3000` runs Vite's dev server and works the same as Vite. `vp test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vp --version`. This is useful when researching documentation, features, and bugs.
61-
62-
## Common Pitfalls
63-
64-
- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
65-
- **Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead.
66-
- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vp test` command, run it using `vp run test`.
67-
- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands.
68-
- **Use Vite+ wrappers for one-off binaries:** Use `vp dlx` instead of package-manager-specific `dlx`/`npx` commands.
69-
- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.
70-
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.
71-
72-
## Review Checklist for Agents
9+
## Review Checklist
7310

7411
- [ ] Run `vp install` after pulling remote changes and before getting started.
75-
- [ ] Run `vp check` and `vp test` to validate changes.
12+
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
13+
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
14+
7615
<!--VITE PLUS END-->

README.md

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ See the `examples/demo` directory for a full working example.
2424

2525
<docgen-index>
2626

27-
* [`initialize(...)`](#initialize)
28-
* [`login(...)`](#login)
29-
* [`logout()`](#logout)
30-
* [`setConsentRequired(...)`](#setconsentrequired)
31-
* [`setConsentGiven(...)`](#setconsentgiven)
32-
* [Interfaces](#interfaces)
33-
* [Type Aliases](#type-aliases)
27+
- [`initialize(...)`](#initialize)
28+
- [`login(...)`](#login)
29+
- [`logout()`](#logout)
30+
- [`setConsentRequired(...)`](#setconsentrequired)
31+
- [`setConsentGiven(...)`](#setconsentgiven)
32+
- [Interfaces](#interfaces)
33+
- [Type Aliases](#type-aliases)
3434

3535
</docgen-index>
3636

@@ -51,8 +51,7 @@ Initialize the SDK with your OneSignal app ID. Call during app startup.
5151
| ----------- | ------------------- |
5252
| **`appId`** | <code>string</code> |
5353

54-
--------------------
55-
54+
---
5655

5756
### login(...)
5857

@@ -66,8 +65,7 @@ Log in to OneSignal as the user identified by `externalId`, switching the user c
6665
| ---------------- | ------------------- |
6766
| **`externalId`** | <code>string</code> |
6867

69-
--------------------
70-
68+
---
7169

7270
### logout()
7371

@@ -77,8 +75,7 @@ logout() => Promise<void>
7775

7876
Log out the current user. The SDK will reference a new device-scoped user.
7977

80-
--------------------
81-
78+
---
8279

8380
### setConsentRequired(...)
8481

@@ -92,8 +89,7 @@ Set whether user privacy consent is required before sending data to OneSignal. C
9289
| -------------- | -------------------- |
9390
| **`required`** | <code>boolean</code> |
9491

95-
--------------------
96-
92+
---
9793

9894
### setConsentGiven(...)
9995

@@ -107,12 +103,10 @@ Indicate whether the user has granted privacy consent.
107103
| ------------- | -------------------- |
108104
| **`granted`** | <code>boolean</code> |
109105

110-
--------------------
111-
106+
---
112107

113108
### Interfaces
114109

115-
116110
#### OneSignalDebugAPI
117111

118112
Debug helpers exposed via `OneSignal.Debug`.
@@ -122,7 +116,6 @@ Debug helpers exposed via `OneSignal.Debug`.
122116
| **setLogLevel** | (logLevel: <a href="#loglevel">LogLevel</a>) =&gt; void | Set the log level printed to LogCat (Android) or the Xcode console (iOS). |
123117
| **setAlertLevel** | (visualLogLevel: <a href="#loglevel">LogLevel</a>) =&gt; void | Set the log level shown to the user as alert dialogs. |
124118

125-
126119
#### OneSignalUserAPI
127120

128121
Current-user operations exposed via `OneSignal.User`.
@@ -153,22 +146,19 @@ Current-user operations exposed via `OneSignal.User`.
153146
| **getExternalId** | () =&gt; Promise&lt;string \| null&gt; | Get the external ID set via `login`, or null if the user is anonymous. |
154147
| **trackEvent** | (name: string, properties?: object \| undefined) =&gt; Promise&lt;void&gt; | Track a custom event with an optional set of JSON-serializable properties. |
155148

156-
157149
#### UserChangedState
158150

159151
| Prop | Type |
160152
| ------------- | ----------------------------------------------- |
161153
| **`current`** | <code><a href="#userstate">UserState</a></code> |
162154

163-
164155
#### UserState
165156

166157
| Prop | Type |
167158
| ----------------- | ------------------- |
168159
| **`onesignalId`** | <code>string</code> |
169160
| **`externalId`** | <code>string</code> |
170161

171-
172162
#### OneSignalPushSubscriptionAPI
173163

174164
Push subscription state and controls exposed via `OneSignal.User.pushSubscription`.
@@ -183,15 +173,13 @@ Push subscription state and controls exposed via `OneSignal.User.pushSubscriptio
183173
| **optIn** | () =&gt; Promise&lt;void&gt; | Opt the user in to push notifications. Prompts for permission if needed. |
184174
| **optOut** | () =&gt; Promise&lt;void&gt; | Opt the user out of push notifications on this device. |
185175

186-
187176
#### PushSubscriptionChangedState
188177

189178
| Prop | Type |
190179
| -------------- | ----------------------------------------------------------------------- |
191180
| **`previous`** | <code><a href="#pushsubscriptionstate">PushSubscriptionState</a></code> |
192181
| **`current`** | <code><a href="#pushsubscriptionstate">PushSubscriptionState</a></code> |
193182

194-
195183
#### PushSubscriptionState
196184

197185
| Prop | Type |
@@ -200,7 +188,6 @@ Push subscription state and controls exposed via `OneSignal.User.pushSubscriptio
200188
| **`token`** | <code>string</code> |
201189
| **`optedIn`** | <code>boolean</code> |
202190

203-
204191
#### OneSignalNotificationsAPI
205192

206193
Notification permission and event handling exposed via `OneSignal.Notifications`.
@@ -218,23 +205,20 @@ Notification permission and event handling exposed via `OneSignal.Notifications`
218205
| **removeNotification** | (id: number) =&gt; Promise&lt;void&gt; | Android only. Cancel a single notification by its Android notification ID. |
219206
| **removeGroupedNotifications** | (id: string) =&gt; Promise&lt;void&gt; | Android only. Cancel a group of notifications by group key. |
220207

221-
222208
#### NotificationClickEvent
223209

224210
| Prop | Type |
225211
| ------------------ | --------------------------------------------------------------------------- |
226212
| **`result`** | <code><a href="#notificationclickresult">NotificationClickResult</a></code> |
227213
| **`notification`** | <code>OSNotification</code> |
228214

229-
230215
#### NotificationClickResult
231216

232217
| Prop | Type |
233218
| -------------- | ------------------- |
234219
| **`actionId`** | <code>string</code> |
235220
| **`url`** | <code>string</code> |
236221

237-
238222
#### OneSignalInAppMessagesAPI
239223

240224
In-app message triggers and event handling exposed via `OneSignal.InAppMessages`.
@@ -251,22 +235,19 @@ In-app message triggers and event handling exposed via `OneSignal.InAppMessages`
251235
| **setPaused** | (pause: boolean) =&gt; void | Pause or resume the display of in-app messages. |
252236
| **getPaused** | () =&gt; Promise&lt;boolean&gt; | Whether in-app messaging is currently paused. |
253237

254-
255238
#### InAppMessageClickEvent
256239

257240
| Prop | Type |
258241
| ------------- | --------------------------------------------------------------------------- |
259242
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
260243
| **`result`** | <code><a href="#inappmessageclickresult">InAppMessageClickResult</a></code> |
261244

262-
263245
#### OSInAppMessage
264246

265247
| Prop | Type |
266248
| --------------- | ------------------- |
267249
| **`messageId`** | <code>string</code> |
268250

269-
270251
#### InAppMessageClickResult
271252

272253
| Prop | Type |
@@ -276,35 +257,30 @@ In-app message triggers and event handling exposed via `OneSignal.InAppMessages`
276257
| **`url`** | <code>string</code> |
277258
| **`urlTarget`** | <code><a href="#inappmessageactionurltype">InAppMessageActionUrlType</a></code> |
278259

279-
280260
#### InAppMessageWillDisplayEvent
281261

282262
| Prop | Type |
283263
| ------------- | --------------------------------------------------------- |
284264
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
285265

286-
287266
#### InAppMessageDidDisplayEvent
288267

289268
| Prop | Type |
290269
| ------------- | --------------------------------------------------------- |
291270
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
292271

293-
294272
#### InAppMessageWillDismissEvent
295273

296274
| Prop | Type |
297275
| ------------- | --------------------------------------------------------- |
298276
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
299277

300-
301278
#### InAppMessageDidDismissEvent
302279

303280
| Prop | Type |
304281
| ------------- | --------------------------------------------------------- |
305282
| **`message`** | <code><a href="#osinappmessage">OSInAppMessage</a></code> |
306283

307-
308284
#### OneSignalSessionAPI
309285

310286
Outcome reporting exposed via `OneSignal.Session`.
@@ -315,7 +291,6 @@ Outcome reporting exposed via `OneSignal.Session`.
315291
| **addUniqueOutcome** | (name: string) =&gt; Promise&lt;void&gt; | <a href="#record">Record</a> a unique outcome with the given name against the current session. |
316292
| **addOutcomeWithValue** | (name: string, value: number) =&gt; Promise&lt;void&gt; | <a href="#record">Record</a> an outcome with the given name and value against the current session. |
317293

318-
319294
#### OneSignalLocationAPI
320295

321296
Location permission and sharing exposed via `OneSignal.Location`.
@@ -326,7 +301,6 @@ Location permission and sharing exposed via `OneSignal.Location`.
326301
| **setShared** | (shared: boolean) =&gt; void | Enable or disable sharing the device location with OneSignal. |
327302
| **isShared** | () =&gt; Promise&lt;boolean&gt; | Whether the device location is currently shared with OneSignal. |
328303

329-
330304
#### OneSignalLiveActivitiesAPI
331305

332306
Live activity controls exposed via `OneSignal.LiveActivities`. iOS only unless noted.
@@ -340,56 +314,48 @@ Live activity controls exposed via `OneSignal.LiveActivities`. iOS only unless n
340314
| **setupDefault** | (options?: <a href="#liveactivitysetupoptions">LiveActivitySetupOptions</a> \| undefined) =&gt; Promise&lt;void&gt; | Set up the OneSignal default live activity, optionally enabling pushToStart/pushToUpdate. |
341315
| **startDefault** | (activityId: string, attributes: <a href="#record">Record</a>&lt;string, unknown&gt;, content: <a href="#record">Record</a>&lt;string, unknown&gt;) =&gt; Promise&lt;void&gt; | Start a live activity backed by the OneSignal default attributes type. |
342316

343-
344317
### Type Aliases
345318

346-
347319
#### LogLevel
348320

349321
<code>(typeof <a href="#loglevel">LogLevel</a>)[keyof typeof LogLevel]</code>
350322

351-
352323
#### Record
353324

354325
Construct a type with a set of properties K of type T
355326

356-
<code>{ [P in K]: T; }</code>
357-
327+
<code>{
328+
[P in K]: T;
329+
}</code>
358330

359331
#### OSNotificationPermission
360332

361333
<code>(typeof <a href="#osnotificationpermission">OSNotificationPermission</a>)[keyof typeof OSNotificationPermission]</code>
362334

363-
364335
#### NotificationEventName
365336

366337
<code>'click' | 'foregroundWillDisplay' | 'permissionChange'</code>
367338

368-
369339
#### NotificationEventTypeMap
370340

371341
<code>{ click: <a href="#notificationclickevent">NotificationClickEvent</a>; foregroundWillDisplay: NotificationWillDisplayEvent; permissionChange: boolean; }</code>
372342

373-
374343
#### InAppMessageEventName
375344

376345
<code>'click' | 'willDisplay' | 'didDisplay' | 'willDismiss' | 'didDismiss'</code>
377346

378-
379347
#### InAppMessageEventTypeMap
380348

381349
<code>{ click: <a href="#inappmessageclickevent">InAppMessageClickEvent</a>; willDisplay: <a href="#inappmessagewilldisplayevent">InAppMessageWillDisplayEvent</a>; didDisplay: <a href="#inappmessagediddisplayevent">InAppMessageDidDisplayEvent</a>; willDismiss: <a href="#inappmessagewilldismissevent">InAppMessageWillDismissEvent</a>; didDismiss: <a href="#inappmessagediddismissevent">InAppMessageDidDismissEvent</a>; }</code>
382350

383-
384351
#### InAppMessageActionUrlType
385352

386353
<code>'browser' | 'webview' | 'replacement'</code>
387354

388-
389355
#### LiveActivitySetupOptions
390356

391357
The setup options for `OneSignal.LiveActivities.setupDefault`.
392358

393-
<code>{ /** * When true, OneSignal will listen for pushToStart tokens for the `OneSignalLiveActivityAttributes` structure. */ enablePushToStart: boolean; /** * When true, OneSignal will listen for pushToUpdate tokens for each start live activity that uses the * `OneSignalLiveActivityAttributes` structure. */ enablePushToUpdate: boolean; }</code>
359+
<code>{ /** _ When true, OneSignal will listen for pushToStart tokens for the `OneSignalLiveActivityAttributes` structure. _/ enablePushToStart: boolean; /** _ When true, OneSignal will listen for pushToUpdate tokens for each start live activity that uses the _ `OneSignalLiveActivityAttributes` structure. \*/ enablePushToUpdate: boolean; }</code>
394360

395361
</docgen-api>

android/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ compileSdk = "35"
1414
junit = "4.13.2"
1515
kotlin = "1.9.25"
1616
minSdk = "23"
17-
onesignal = "5.8.1"
17+
onesignal = "5.9.1"
1818
targetSdk = "35"
1919

2020
[libraries]

android/src/main/kotlin/com/onesignal/capacitor/OneSignalCapacitorPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class OneSignalCapacitorPlugin : Plugin(),
134134
initialized = true
135135

136136
OneSignalWrapper.sdkType = "capacitor"
137-
OneSignalWrapper.sdkVersion = "010002"
137+
OneSignalWrapper.sdkVersion = "010003"
138138
OneSignal.initWithContext(context, appId)
139139

140140
// If the SDK was initialized from a non-Activity context (FCM/work

0 commit comments

Comments
 (0)