Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/actions/setup-demo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
using: 'composite'
steps:
- name: Set up Vite+
uses: voidzero-dev/setup-vp@v1
uses: voidzero-dev/setup-vp@v1.21.1
with:
cache: true
run-install: true
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
- **Read and fill out each of the checklists below**
- **Remove this section after reading**

<!-- END -->

# Description
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
uses: OneSignal/sdk-shared/.github/actions/setup-git-user@main

- name: Set up Vite+
uses: voidzero-dev/setup-vp@v1
uses: voidzero-dev/setup-vp@v1.21.1
with:
cache: true
run-install: true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ examples/*/ios/*.xcodeproj/xcuserdata
examples/*/ios/*.xcworkspace/xcshareddata
examples/*/ios/*.xcworkspace/xcuserdata
examples/*/ios/Pods/Pods.xcodeproj/xcuserdata
.vitest/
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ These commands map to their corresponding tools. For example, `vp dev --port 300

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to validate changes.

<!--VITE PLUS END-->
4 changes: 2 additions & 2 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ The SDK is still accessible via a `OneSignal` static class. It provides access t
| **React Native** | **Description** |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `OneSignal.initialize("YOUR_ONESIGNAL_APP_ID")` | _Initializes the OneSignal SDK. This should be called during startup of the application._ |
| `OneSignal.login("USER_EXTERNAL_ID")` | _Login to OneSignal under the user identified by the [externalId] provided. The act of logging a user into the OneSignal SDK will switch the [user] context to that specific user._ \*- If the [externalId] exists, the user will be retrieved and the context will be set from that user information. If operations have already been performed under a device-scoped user, they will not*** be applied to the now logged in user (they will be lost). - If the [externalId] does not exist the user, the user will be created and the context set from the current local state. If operations have already been performed under a device-scoped user, those operations ***will*** be applied to the newly created user. ***Push Notifications and In App Messaging\* Logging in a new user will automatically transfer the push notification and in app messaging subscription from the current user (if there is one) to the newly logged in user. This is because both push notifications and in-app messages are owned by the device. |
| `OneSignal.login("USER_EXTERNAL_ID")` | _Login to OneSignal under the user identified by the [externalId] provided. The act of logging a user into the OneSignal SDK will switch the [user] context to that specific user._ \*- If the [externalId] exists, the user will be retrieved and the context will be set from that user information. If operations have already been performed under a device-scoped user, they will not*** be applied to the now logged in user (they will be lost). - If the [externalId] does not exist the user, the user will be created and the context set from the current local state. If operations have already been performed under a device-scoped user, those operations _**will**_ be applied to the newly created user. ***Push Notifications and In App Messaging\* Logging in a new user will automatically transfer the push notification and in app messaging subscription from the current user (if there is one) to the newly logged in user. This is because both push notifications and in-app messages are owned by the device. |
| `OneSignal.logout()` | _Logout the user previously logged in via [login]. The [user] property now references a new device-scoped user. A device-scoped user has no user identity that can later be retrieved, except through this device as long as the app remains installed and the app data is not cleared._ |
| `OneSignal.setConsentGiven(true)` | _Indicates whether privacy consent has been granted. This field is only relevant when the application has opted into data privacy protections. See [requiresPrivacyConsent]._ |
| `OneSignal.setConsentRequired(true)` | _Determines whether a user must consent to privacy prior to their user data being sent up to OneSignal. This should be set to `true` prior to the invocation of `initialize` to ensure compliance._ |
Expand Down Expand Up @@ -305,7 +305,7 @@ The Notifications namespace is accessible via `OneSignal.Notifications` and prov
| `OneSignal.Notifications.registerForProvisionalAuthorization()` | _(iOS only) Instead of having to prompt the user for permission to send them push notifications, your app can request provisional authorization._ |
| `OneSignal.Notifications.addEventListener("permissionChange", (observer) => {});` **_See below for usage_** | _This method will fire when a notification permission setting changes. This happens when the user enables or disables notifications for your app from the system settings outside of your app._ |
| `OneSignal.Notifications.removeEventListener("permissionChange", (observer) => {});` **_See below for usage_** | _Remove a push permission observer that has been previously added._ |
| `OneSignal.Notifications.addEventListener("foregroundWillDisplay", (event) => {};)` **_See below for usage_** | \*Sets the handler to run before displaying a notification while the app is in focus. Use this handler to read notification data and change it or decide if the notification should*** show or not. ***Note:*** this runs ***after\* the [Notification Service Extension](https://documentation.onesignal.com/docs/service-extensions) which can be used to modify the notification before showing it. |
| `OneSignal.Notifications.addEventListener("foregroundWillDisplay", (event) => {};)` **_See below for usage_** | \*Sets the handler to run before displaying a notification while the app is in focus. Use this handler to read notification data and change it or decide if the notification should*** show or not. _**Note:**_ this runs ***after\* the [Notification Service Extension](https://documentation.onesignal.com/docs/service-extensions) which can be used to modify the notification before showing it. |
| `OneSignal.Notifications.addEventListener("click", (event) => {};)` **_See below for usage_** | _Sets a handler that will run whenever a notification is opened by the user._ |

### Prompt for Push Notification Permission
Expand Down
Loading