Skip to content

Commit

Permalink
Merge pull request #200 from OneSignal/update-readme
Browse files Browse the repository at this point in the history
Update Usage in README to reflect major release changes
  • Loading branch information
rgomezp authored Sep 25, 2023
2 parents 9efebd9 + 31d46a2 commit 27da6e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ You can pass props to the plugin config object to configure:
| `iosNSEFilePath` | optional | The local path to a custom Notification Service Extension (NSE), written in Objective-C. The NSE will typically start as a copy of the [default NSE](https://github.com/OneSignal/onesignal-expo-plugin/blob/main/support/serviceExtensionFiles/NotificationService.m), then altered to support any custom logic required. e.g: `"./assets/NotificationService.m"`. |

### OneSignal App ID
Add your OneSignal App ID to your [Expo constants via the `extra` param](https://docs.expo.dev/versions/latest/config/app/):
Add your OneSignal App ID to your [Expo constants via the `extra` param](https://docs.expo.dev/versions/latest/config/app/#extra):

**Example:**
```json
Expand All @@ -101,18 +101,18 @@ Add your OneSignal App ID to your [Expo constants via the `extra` param](https:/
}
```

You can then access the value to pass to the `setAppId` function:
You can then access the value to pass to the `initialize` function:

```js
import OneSignal from 'react-native-onesignal';
import Constants from "expo-constants";
OneSignal.setAppId(Constants.manifest.extra.oneSignalAppId);
OneSignal.initialize(Constants.expoConfig.extra.oneSignalAppId);
```

Alternatively, pass the app ID directly to the function:

```js
OneSignal.setAppId("YOUR-ONESIGNAL-APP-ID");
OneSignal.initialize("YOUR-ONESIGNAL-APP-ID");
```

### Versioning
Expand Down

0 comments on commit 27da6e8

Please sign in to comment.