Skip to content

Commit

Permalink
Merge pull request #106 from OneSignal/cd_update
Browse files Browse the repository at this point in the history
Generator Update
  • Loading branch information
rgomezp authored May 16, 2023
2 parents a6e4c54 + 9c39342 commit 5148dcc
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 117 deletions.
28 changes: 19 additions & 9 deletions MigrationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,17 @@ Example:
await OneSignal.Notifications.requestPermission();
```

| Sync/Async | Function Name | Description | Argument List |
| ---------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `async` | `setDefaultUrl` | Sets the default URL for notifications. | `url` (string) |
| `async` | `setDefaultTitle` | Sets the default title for notifications. | `title` (string) |
| `sync` | `isPushSupported` | Returns true if the current browser supports web push. | |
| `async` | `getPermissionStatus` | Returns the browser's current notification permission. | `onComplete` (Action<NotificationPermission>) |
| `async` | `requestPermission` | Requests push notifications permission via the native browser prompt. | |
| `sync` | `addEventListener` | Adds an event listener for the following events:<br><br>- `click`<br>- `willDisplay`<br>- `dismiss`<br>- `permissionPromptDisplay`<br>- `permissionChange`*<br> * argument type: bool | - `<event>` (string)<br>- `(arg: <type>) => {}` (callback) |
| `sync` | `removeEventListener` | Removes the event listener. | `() => {}` (the event listener you want to remove) |

| Sync/Async | Function / Property | Description | Argument List |
| ---------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `async` | `setDefaultUrl()` | Sets the default URL for notifications. | `url` (string) |
| `async` | `setDefaultTitle()` | Sets the default title for notifications. | `title` (string) |
| `sync` | `isPushSupported()` | Returns true if the current browser supports web push. | |
| `async` | `requestPermission()` | Requests push notifications permission via the native browser prompt. | |
| `sync` | `addEventListener()` | Adds an event listener for the following events:<br><br>- `click`<br>- `willDisplay`<br>- `dismiss`<br>- `permissionPromptDisplay`<br>- `permissionChange`*<br> * argument type: bool | - `<event>` (string)<br>- `(arg: <type>) => {}` (callback) |
| `sync` | `removeEventListener()` | Removes the event listener. | `() => {}` (the event listener you want to remove) |
| | `permission` | A boolean representing whether or not the user has granted permission for push notifications. | |
| | `permissionNative` | A string representing the native push permission status: 'default', 'granted', or 'denied'. | |



Expand Down Expand Up @@ -172,6 +174,14 @@ OneSignal.Debug.setLogLevel(“trace”);

# Limitations

## May 2023
## Version 16 (beta)
Please test thoroughly prior to production use.
* Any User namespace calls must be invoked **after** initialization (async). Example: `OneSignal.User.addTag("tag", "2");`
* HTTP environments are not supported.
* AMP environments are not supported.
* Identity verification is not functional.

## January 2023
### Version 16 (alpha)
It is recommended this version is used **only** in development and staging envrionments.
Expand Down
Loading

0 comments on commit 5148dcc

Please sign in to comment.