Skip to content

Commit fe802cb

Browse files
committed
update header and install instructions
* Add header noting this is v5 alpha 1 to the migration guide * update install instructions
1 parent 797a9b5 commit fe802cb

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

MIGRATION_GUIDE.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<h1 align="center">OneSignal SDK v5.0.0-alpha1 Migration Guide</h1>
2+
3+
![Screen Shot 2022-12-20 at 2 55 24 AM](https://user-images.githubusercontent.com/11739227/208625336-d28c8d01-a7cf-4f8e-9643-ac8d1948e9ae.png)
4+
15
# Intro
26

37
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.
@@ -36,9 +40,26 @@ As mentioned above, the iOS SDK is making the jump from `v3` to `v5`, in order t
3640

3741
## SDK Installation
3842

39-
Update the OneSignal SDK in your Xcode project
43+
### Import Changes
44+
**Objective-C**
45+
46+
```objc
47+
// Replace the old import statement
48+
#import <OneSignal/OneSignal.h>
49+
50+
// With the new import statement
51+
#import <OneSignalFramework/OneSignalFramework.h>
52+
```
53+
**Swift**
54+
```swift
55+
// Replace the old import statement
56+
import OneSignal
57+
58+
// With the new import statement
59+
import OneSignalFramework
60+
```
4061

41-
TODO: What changes, if any, for importing OneSignal into a project via CocoaPods, SwiftPM
62+
Update the version of the OneSignal iOS SDK your application uses to `5.0.0`. Other than updating the import statement above, there are no additional changes needed to import the OneSignal SDK in your Xcode project. See [the existing installation instructions](https://documentation.onesignal.com/docs/ios-sdk-setup#step-3-import-the-onesignal-sdk-into-your-xcode-project).
4263

4364
# API Changes
4465
## Namespaces
@@ -197,8 +218,8 @@ The SDK is still accessible via a `OneSignal` static class. It provides access t
197218
| `OneSignal.logout()` | `[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.* |
198219
| `let granted: Bool = OneSignal.privacyConsent`<br><br>`OneSignal.privacyConsent = true` | `BOOL granted = OneSignal.getPrivacyConsent`<br><br>`[OneSignal setPrivacyConsent:true]` | *Indicates whether privacy consent has been granted. This field is only relevant when the application has opted into data privacy protections. See [requiresPrivacyConsent].* |
199220
| `let required: Bool = OneSignal.requiresPrivacyConsent`<br><br>`OneSignal.requiresPrivacyConsent = true` | `BOOL required = [OneSignal requiresPrivacyConsent]`<br><br>`[OneSignal setRequiresPrivacyConsent: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.* |
200-
| `OneSignal.setLaunchURLsInApp(true)` | `[OneSignal setLaunchURLsInApp:true]` | *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.* |
201-
| `OneSignal.setProvidesNotificationSettingsView(true)` | `[OneSignal setProvidesNotificationSettingsView:true]` | TODO: Not new but I can’t find this in our documentation at all. |
221+
| `OneSignal.setLaunchURLsInApp(true)` | `[OneSignal setLaunchURLsInApp:true]` | *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.*
222+
|
202223

203224

204225

0 commit comments

Comments
 (0)