Skip to content

Commit bb6bb45

Browse files
authored
Merge pull request #647 from OneSignal/fix/documentationNits
[Fix] Documentation nits
2 parents 9c5b08d + ad3db73 commit bb6bb45

File tree

4 files changed

+47
-26
lines changed

4 files changed

+47
-26
lines changed

MIGRATION_GUIDE_v3_to_v5.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ To resume receiving of push notifications (driving the native permission prompt
119119

120120
pushSubscription.OptIn();
121121

122+
To observe changes to the push subscription you can add a custom method to the event:
123+
124+
OneSignal.User.PushSubscription.Changed += yourOnPushSubscriptionChangedMethod;
125+
126+
public void yourOnPushSubscriptionChangedMethod(object sender, PushSubscriptionChangedEventArgs e) {
127+
...
128+
}
122129

123130
**Email/SMS Subscriptions**
124131
Email and/or SMS subscriptions can be added or removed via:
@@ -151,7 +158,7 @@ The SDK is still accessible via a `OneSignal` static class, it provides access t
151158
| `void 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.* |
152159

153160

154-
**User Namespace**
161+
### User Namespace
155162
The user name space is accessible via `OneSignal.User` and provides access to user-scoped functionality.
156163

157164
| **C#** | **Description** |
@@ -173,7 +180,7 @@ The user name space is accessible via `OneSignal.User` and provides access to us
173180
| `void RemoveTags(params string[] keys)` | *Remove multiple tags from the current user.* |
174181

175182

176-
**Session Namespace**
183+
### Session Namespace
177184
The session namespace is accessible via `OneSignal.Session` and provides access to session-scoped functionality.
178185

179186
| **C#** | **Description** |
@@ -183,7 +190,7 @@ The session namespace is accessible via `OneSignal.Session` and provides access
183190
| `void AddOutcomeWithValue(string name, float value)` | *Add an outcome with the provided name and value, captured against the current session.* |
184191

185192

186-
**Notifications Namespace**
193+
### Notifications Namespace
187194
The notification namespace is accessible via `OneSignal.Notifications` and provides access to notification-scoped functionality.
188195

189196
| **C#** | **Description** |
@@ -198,7 +205,7 @@ The notification namespace is accessible via `OneSignal.Notifications` and provi
198205
| `event EventHandler<NotificationClickEventArgs> Clicked` <br><br> `NotificationClickEventArgs { INotification Notification, INotificationClickResult Result }` | *Set an event that will fire whenever a notification is clicked on by the user.* |
199206

200207

201-
**Location Namespace**
208+
### Location Namespace
202209
The location namespace is accessible via `OneSignal.Location` and provides access to location-scoped functionality.
203210

204211
| **C#** | **Description** |
@@ -207,7 +214,7 @@ The location namespace is accessible via `OneSignal.Location` and provides acces
207214
| `void RequestPermission()` | *Use this method to manually prompt the user for location permissions. This allows for geotagging so you send notifications to users based on location.* |
208215

209216

210-
**InAppMessages Namespace**
217+
### InAppMessages Namespace
211218
The In App Messages namespace is accessible via `OneSignal.InAppMessages` and provides access to in app messages-scoped functionality.
212219

213220
| **C#** | **Description** |
@@ -222,7 +229,7 @@ The In App Messages namespace is accessible via `OneSignal.InAppMessages` and pr
222229
| `event EventHandler<InAppMessageClickEventArgs> Clicked` <br><br> `InAppMessageClickEventArgs { IInAppMessage Message, IInAppMessageClickResult Result }` | *Set the IAM click events.* |
223230

224231

225-
**LiveActivities Namespace**
232+
### LiveActivities Namespace
226233
The Live Activities namespace is accessible via `OneSignal.LiveActivities` and provides access to live activities-scoped functionality.
227234

228235
| **C#** | **Description** |
@@ -231,7 +238,7 @@ The Live Activities namespace is accessible via `OneSignal.LiveActivities` and p
231238
| `Task<bool> ExitAsync(string activityId)` | ***Note:*** *This method is for iOS only<br>Exiting a Live activity deletes the association between a customer defined activityId with a Live Activity temporary push token on OneSignal's server.* |
232239

233240

234-
**Debug Namespace**
241+
### Debug Namespace
235242
The debug namespace is accessible via `OneSignal.Debug` and provides access to debug-scoped functionality.
236243

237244
| **C#** | **Description** |
@@ -280,10 +287,11 @@ Execution failed for task ':launcher:mergeReleaseJavaResource'.
280287
> More than one file was found with OS independent path 'META-INF/kotlinx_coroutines_core.version'.
281288
```
282289

283-
1. Go to **Player Settings** and click the Android Tab. Under **Publishing Settings**, enable the following:
290+
1. From the Unity Editor, navigate to **Edit > Project Settings > Player** and click the **Android** settings tab.
291+
2. Expand **Publishing Settings** and enable:
284292
- Custom Main Gradle Template
285293
- Custom Gradle Properties Template
286-
2. Resolve Android dependencies with EDM4U at **Assets > External Dependency Manager > Android Resolver > Force Resolve**
294+
3. Navigate to **Assets > External Dependency Manager > Android Resolver > Force Resolve** and resolve your Android dependencies.
287295

288296
## iOS
289297
**Build error**

OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ To resume receiving of push notifications (driving the native permission prompt
119119

120120
pushSubscription.OptIn();
121121

122+
To observe changes to the push subscription you can add a custom method to the event:
123+
124+
OneSignal.User.PushSubscription.Changed += yourOnPushSubscriptionChangedMethod;
125+
126+
public void yourOnPushSubscriptionChangedMethod(object sender, PushSubscriptionChangedEventArgs e) {
127+
...
128+
}
122129

123130
**Email/SMS Subscriptions**
124131
Email and/or SMS subscriptions can be added or removed via:
@@ -151,7 +158,7 @@ The SDK is still accessible via a `OneSignal` static class, it provides access t
151158
| `void 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.* |
152159

153160

154-
**User Namespace**
161+
### User Namespace
155162
The user name space is accessible via `OneSignal.User` and provides access to user-scoped functionality.
156163

157164
| **C#** | **Description** |
@@ -173,7 +180,7 @@ The user name space is accessible via `OneSignal.User` and provides access to us
173180
| `void RemoveTags(params string[] keys)` | *Remove multiple tags from the current user.* |
174181

175182

176-
**Session Namespace**
183+
### Session Namespace
177184
The session namespace is accessible via `OneSignal.Session` and provides access to session-scoped functionality.
178185

179186
| **C#** | **Description** |
@@ -183,7 +190,7 @@ The session namespace is accessible via `OneSignal.Session` and provides access
183190
| `void AddOutcomeWithValue(string name, float value)` | *Add an outcome with the provided name and value, captured against the current session.* |
184191

185192

186-
**Notifications Namespace**
193+
### Notifications Namespace
187194
The notification namespace is accessible via `OneSignal.Notifications` and provides access to notification-scoped functionality.
188195

189196
| **C#** | **Description** |
@@ -198,7 +205,7 @@ The notification namespace is accessible via `OneSignal.Notifications` and provi
198205
| `event EventHandler<NotificationClickEventArgs> Clicked` <br><br> `NotificationClickEventArgs { INotification Notification, INotificationClickResult Result }` | *Set an event that will fire whenever a notification is clicked on by the user.* |
199206

200207

201-
**Location Namespace**
208+
### Location Namespace
202209
The location namespace is accessible via `OneSignal.Location` and provides access to location-scoped functionality.
203210

204211
| **C#** | **Description** |
@@ -207,7 +214,7 @@ The location namespace is accessible via `OneSignal.Location` and provides acces
207214
| `void RequestPermission()` | *Use this method to manually prompt the user for location permissions. This allows for geotagging so you send notifications to users based on location.* |
208215

209216

210-
**InAppMessages Namespace**
217+
### InAppMessages Namespace
211218
The In App Messages namespace is accessible via `OneSignal.InAppMessages` and provides access to in app messages-scoped functionality.
212219

213220
| **C#** | **Description** |
@@ -222,7 +229,7 @@ The In App Messages namespace is accessible via `OneSignal.InAppMessages` and pr
222229
| `event EventHandler<InAppMessageClickEventArgs> Clicked` <br><br> `InAppMessageClickEventArgs { IInAppMessage Message, IInAppMessageClickResult Result }` | *Set the IAM click events.* |
223230

224231

225-
**LiveActivities Namespace**
232+
### LiveActivities Namespace
226233
The Live Activities namespace is accessible via `OneSignal.LiveActivities` and provides access to live activities-scoped functionality.
227234

228235
| **C#** | **Description** |
@@ -231,7 +238,7 @@ The Live Activities namespace is accessible via `OneSignal.LiveActivities` and p
231238
| `Task<bool> ExitAsync(string activityId)` | ***Note:*** *This method is for iOS only<br>Exiting a Live activity deletes the association between a customer defined activityId with a Live Activity temporary push token on OneSignal's server.* |
232239

233240

234-
**Debug Namespace**
241+
### Debug Namespace
235242
The debug namespace is accessible via `OneSignal.Debug` and provides access to debug-scoped functionality.
236243

237244
| **C#** | **Description** |
@@ -280,10 +287,11 @@ Execution failed for task ':launcher:mergeReleaseJavaResource'.
280287
> More than one file was found with OS independent path 'META-INF/kotlinx_coroutines_core.version'.
281288
```
282289

283-
1. Go to **Player Settings** and click the Android Tab. Under **Publishing Settings**, enable the following:
290+
1. From the Unity Editor, navigate to **Edit > Project Settings > Player** and click the **Android** settings tab.
291+
2. Expand **Publishing Settings** and enable:
284292
- Custom Main Gradle Template
285293
- Custom Gradle Properties Template
286-
2. Resolve Android dependencies with EDM4U at **Assets > External Dependency Manager > Android Resolver > Force Resolve**
294+
3. Navigate to **Assets > External Dependency Manager > Android Resolver > Force Resolve** and resolve your Android dependencies.
287295

288296
## iOS
289297
**Build error**

OneSignalExample/Assets/OneSignal/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ There are two methods of installation available for the OneSignal Unity SDK:
6363
![onesignal unity sdk in my assets](Documentation/asset_listing.png)
6464

6565
4. A prompt to import all of the files of the OneSignal Unity SDK will appear. Click **Import** to continue and compile the scripts into your project.
66-
5. Navigate to **Window > OneSignal** (or follow the popup if upgrading) in the Unity Editor which will bring up a window with some final steps which need
66+
5. Navigate to **Window > OneSignal SDK Setup** (or follow the popup if upgrading) in the Unity Editor which will bring up a window with some final steps which need
6767
to be completed in order to finalize the installation. The most important of these steps is **Import OneSignal packages**.
6868

6969
> *Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"*
@@ -90,7 +90,7 @@ There are two methods of installation available for the OneSignal Unity SDK:
9090
and click **Save**.
9191
3. Open the **Window > Package Manager** and switch to **My Registries** via the **Packages:** dropdown menu. You will see all of the OneSignal Unity SDK packages available
9292
on which you can then click **Install** for the platforms you would like to include. Dependencies will be added automatically.
93-
4. Once the packages have finished importing you will find a new menu under **Window > OneSignal**. Open it and you will find some final steps which need to be completed
93+
4. Once the packages have finished importing you will find a new menu under **Window > OneSignal SDK Setup**. Open it and you will find some final steps which need to be completed
9494
in order to finalize the installation.
9595
9696
> *Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"*
@@ -122,6 +122,12 @@ After building in Unity and exporting the XCode project follow these steps:
122122
7. Make sure all **Targets** have **Enable Bitcode** set to **No** in **Build Settings**.
123123
124124
### Android
125+
1. From the Unity Editor, navigate to **Edit > Project Settings > Player** and click the **Android** settings tab.
126+
2. Expand **Publishing Settings** and enable:
127+
- Custom Main Gradle Template
128+
- Custom Gradle Properties Template
129+
3. Navigate to **Assets > External Dependency Manager > Android Resolver > Force Resolve** and resolve your Android dependencies.
130+
125131
Most of the Android setup was already handled during installation!
126132
127133
The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.androidlib`

0 commit comments

Comments
 (0)