Skip to content

Commit 8da0fc1

Browse files
authored
Merge pull request #626 from OneSignal/removeSetLaunchUrlsInApp
[User Model] Fixes
2 parents 63eb005 + d027998 commit 8da0fc1

File tree

132 files changed

+172
-520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+172
-520
lines changed

MIGRATION_GUIDE_v3_to_v5.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Unity v5.0.0-beta.3 Migration Guide
1+
# Unity v5.0.0 Migration Guide
22
In this release, we are making a significant shift from a device-centered model to a user-centered model. A user-centered model allows for more powerful omni-channel integrations within the OneSignal platform.
33

44
This migration guide will walk you through the Unity SDK v5.0.0 changes as a result of this shift.
@@ -83,6 +83,8 @@ Initialization of the OneSignal SDK, although similar to past versions, has chan
8383
// We recommend removing the following code and instead using an In-App Message to prompt for notification permission.
8484
var result = await OneSignal.Notifications.RequestPermissionAsync(true);
8585

86+
_For iOS: Remove any usages of `setLaunchURLsInApp` as the method and functionality has been removed._
87+
8688
If your integration is not user-centric, there is no additional startup code required. A user is automatically created as part of the push subscription creation, both of which are only accessible from the current device and the OneSignal dashboard.
8789

8890
If your integration is user-centric, or you want the ability to identify as the same user on multiple devices, the OneSignal SDK should be called once the user has been identified:
@@ -147,7 +149,6 @@ The SDK is still accessible via a `OneSignal` static class, it provides access t
147149
| `void Initialize(string appId)` | *Initialize the OneSignal SDK. This should be called during startup of the application.* |
148150
| `void Login(string externalId, string jwtBearerToken = null)` | *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.*<br><br>- *If the [externalId] exists the user will be retrieved and the context set from that user information. If operations have already been performed under a guest user, they* ***will not*** *be applied to the now logged in user (they will be lost).*<br>- *If the [externalId] does not exist the user will be created and the context set from the current local state. If operations have already been performed under a guest user those operations* ***will*** *be applied to the newly created user.*<br><br>***Push Notifications and In App Messaging***<br>*Logging in a new user will automatically transfer push notification and in app messaging subscriptions from the current user (if there is one) to the newly logged in user. This is because both Push and IAM are owned by the device.* |
149151
| `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.* |
150-
| `void SetLaunchURLsInApp(bool launchInApp)` | ***Note:*** *This method is for iOS only<br>This method can be used to set if launch URLs should be opened in Safari or within the application. Set to true to launch all notifications with a URL in the app instead of the default web browser. Make sure to call SetLaunchURLsInApp before the initialize call.* |
151152

152153

153154
**User Namespace**
@@ -203,7 +204,7 @@ The location namespace is accessible via `OneSignal.Location` and provides acces
203204
| **C#** | **Description** |
204205
| ---------------------------| -------------------------------------------------------------------------------------------------------------------------------------------------------- |
205206
| `bool IsShared` | *Whether location is currently shared with OneSignal.* |
206-
| `Task<bool> RequestPermissionAsync()` | *Use this method to manually prompt the user for location permissions. This allows for geotagging so you send notifications to users based on location.* |
207+
| `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.* |
207208

208209

209210
**InAppMessages Namespace**
@@ -240,12 +241,13 @@ The debug namespace is accessible via `OneSignal.Debug` and provides access to d
240241

241242

242243
# Limitations
243-
- Recommend using only in development and staging environments for Beta releases.
244-
- Outcomes will be available in a future release
244+
- Changing app IDs is not supported.
245+
- Any User namespace calls must be invoked after initialization. Example: OneSignal.User.AddTag("tag", "2")
246+
- In the SDK, the user state is only refreshed from the server when a new session is started (cold start or backgrounded for over 30 seconds) or when the user is logged in. This is by design.
245247

246248
# Known issues
247249
- Identity Verification
248-
- We will be introducing JWT in follow up Beta release
250+
- We will be introducing JWT in a follow up release
249251

250252
# Troubleshooting
251253

OneSignalExample/Assets/OneSignal/Attribution/OneSignalVSAttribution.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Removed `SetLaunchURLsInApp`
10+
- Removed async from location request permission and updated method name to `RequestPermission`
11+
- Updated included iOS SDK to [5.0.1](https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/5.0.1)
12+
- Updated included Android SDK to [5.0.0](https://github.com/OneSignal/OneSignal-Android-SDK/releases/tag/5.0.0)
13+
- Updated default OneSignal Android notificaiton icons to new logo
14+
### Fixed
15+
- Outcome method calls on Android
16+
- Completion check for the Copy Android plugin to Assets setup step
17+
818
## [5.0.0-beta.3]
919
### Changed
1020
- Updated `Notifications`, `InAppMessages`, and `User` models to have Pascal Case properties

OneSignalExample/Assets/OneSignal/Editor/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/Editor/OneSignalBootstrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/Editor/OneSignalFileInventory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/Editor/PackageManagement/Dependency.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/Editor/PackageManagement/Manifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/Editor/PackageManagement/ScopeRegistry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Modified MIT License
33
*
4-
* Copyright 2022 OneSignal
4+
* Copyright 2023 OneSignal
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

OneSignalExample/Assets/OneSignal/Editor/Setup/OneSignalSetupStep.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Modified MIT License
44
*
5-
* Copyright 2022 OneSignal
5+
* Copyright 2023 OneSignal
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)