Skip to content

Commit

Permalink
Merge pull request #1301 from OneSignal/release-5.0.0
Browse files Browse the repository at this point in the history
Release 5.0.0
  • Loading branch information
emawby authored and nan-li committed Oct 30, 2023
2 parents 9dae545 + 0f80bcc commit 738344b
Show file tree
Hide file tree
Showing 148 changed files with 2,431 additions and 1,123 deletions.
13 changes: 6 additions & 7 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center">OneSignal iOS SDK v5.0.0-beta-04 Migration Guide</h1>
<h1 align="center">OneSignal iOS SDK v5.0.0 Migration Guide</h1>

![OneSignal Omni Channel Banner](https://user-images.githubusercontent.com/11739227/208625336-d28c8d01-a7cf-4f8e-9643-ac8d1948e9ae.png)

Expand All @@ -8,7 +8,7 @@ In this release, we are making a significant shift from a device-centered model

To facilitate this change, the `externalId` approach for identifying users is being replaced by the `login` and `logout` methods. In addition, the SDK now makes use of namespaces such as `User`, `Notifications`, and `InAppMessages` to better separate code.

The iOS SDK is making the jump from `v3` to `v5`, in order to align across OneSignal’s suite of client SDKs. This guide will walk you through the iOS SDK `5.0.0-beta-04` changes as a result of this shift.
The iOS SDK is making the jump from `v3` to `v5`, in order to align across OneSignal’s suite of client SDKs. This guide will walk you through the iOS SDK `5.0.0` changes as a result of this shift.

# Overview

Expand Down Expand Up @@ -60,10 +60,10 @@ As mentioned above, the iOS SDK is making the jump from `v3` to `v5`, in order t
```

### Option 1. Swift Package Manager
Update the version of the OneSignal-XCFramework your application uses to `5.0.0-beta-04`. In addition, the Package Product name has been changed from `OneSignal` to `OneSignalFramework`. See [the existing installation instructions](https://documentation.onesignal.com/docs/swift-package-manager-setup).
Update the version of the OneSignal-XCFramework your application uses to `5.0.0`. In addition, the Package Product name has been changed from `OneSignal` to `OneSignalFramework`. See [the existing installation instructions](https://documentation.onesignal.com/docs/swift-package-manager-setup).

### Option 2. CocoaPods
Update the version of the OneSignalXCFramework your application uses to `5.0.0-beta-04`. 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).
Update the version of the OneSignalXCFramework 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).

# API Changes
## Namespaces
Expand Down Expand Up @@ -214,7 +214,7 @@ Email and/or SMS subscriptions can be added or removed via the following methods

# API Reference

Below is a comprehensive reference to the `5.0.0-beta-04` OneSignal SDK.
Below is a comprehensive reference to the `5.0.0` OneSignal SDK.

## OneSignal

Expand Down Expand Up @@ -756,11 +756,10 @@ The Debug namespace is accessible via `OneSignal.Debug` and provide access to de
# Limitations

- This is a Beta release so please test thorougly prior to production use.
- Changing app IDs is not supported.
- Any `User` namespace calls must be invoked **after** initialization. Example: `OneSignal.User.addTag("tag", "2")`
- 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.

# Known issues
- Identity Verification
- We will be introducing JWT in a follow up Beta release
- We will be introducing Identity Verification using JWT in a follow up release
2 changes: 1 addition & 1 deletion OneSignal.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OneSignal"
s.version = "5.0.0-beta-06"
s.version = "5.0.0"
s.summary = "OneSignal push notification library for mobile apps."
s.homepage = "https://onesignal.com"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion OneSignalXCFramework.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OneSignalXCFramework"
s.version = "5.0.0-beta-06"
s.version = "5.0.0"
s.summary = "OneSignal push notification library for mobile apps."
s.homepage = "https://onesignal.com"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
36 changes: 18 additions & 18 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,48 +105,48 @@ let package = Package(
),
.binaryTarget(
name: "OneSignalFramework",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalFramework.xcframework.zip",
checksum: "f0c7a65cbcab6d82e3bd241b19c6cd4a0d9fc446e6f8f4c657322066dc547ee8"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalFramework.xcframework.zip",
checksum: "e9d9cba7604dc4a9e75592689ca2944d774bebcd68e4c8f3796d2f559e6919e1"
),
.binaryTarget(
name: "OneSignalInAppMessages",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalInAppMessages.xcframework.zip",
checksum: "5c48f1a16166f043eaf510e83d77428c6dab6b27b4544ad8a9fc438a442a7d33"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalInAppMessages.xcframework.zip",
checksum: "639e8b11bf77cf438b021e2f06edde42b34bc718c59947685aada28b59e8f62b"
),
.binaryTarget(
name: "OneSignalLocation",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalLocation.xcframework.zip",
checksum: "fd711bec318dcb9b1fc8087ae83e70f3e39c886d983d258ca96aa1c7241e7a9b"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalLocation.xcframework.zip",
checksum: "118e937eeb43654bf4b10c0d70985a81985530a8e43e3992af7b728603349d82"
),
.binaryTarget(
name: "OneSignalUser",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalUser.xcframework.zip",
checksum: "5bf8f7807c8ddabe2f55d7284e3cc084bf0bbf7b8fc21c3d5ea7890b99c5725c"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalUser.xcframework.zip",
checksum: "9153935350d7fdd2a7a530723cb678a49fda662b6098cb8b4b354db9c49911aa"
),
.binaryTarget(
name: "OneSignalNotifications",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalNotifications.xcframework.zip",
checksum: "d377cee1c5b0f208a4ef6eedaf36b59ae966cc7db25e0074e46ec3f6294a8d41"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalNotifications.xcframework.zip",
checksum: "fd883e8944a1530335601c944c5d22c7ccf1d80c0b106031e2f83d8489040597"
),
.binaryTarget(
name: "OneSignalExtension",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalExtension.xcframework.zip",
checksum: "38ed96d71694f425a9aaae9226f58e2630a0e841fd2d598b1fa75a14758e998f"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalExtension.xcframework.zip",
checksum: "cd50a84aeb99ffabf561976c2576e47fde4411a38eb071d9bd7624a3e4d10534"
),
.binaryTarget(
name: "OneSignalOutcomes",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalOutcomes.xcframework.zip",
checksum: "7b273ca6b35fd5f9cce8dfdd9076b495950a12d96f543e02e133dde5b1d0e4f5"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalOutcomes.xcframework.zip",
checksum: "9e7c86c7e9fd1f070b9fc25327a5a9482390819995f2276cbe25760f263972e7"
),
.binaryTarget(
name: "OneSignalOSCore",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalOSCore.xcframework.zip",
checksum: "e665db8193cd76d79487b64deff9361fe9798240b74b748cbac09311607b3484"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalOSCore.xcframework.zip",
checksum: "7e69eda2258da9c33b7c2368480e4b7620b7be2e1ded950a44e2d4788eb88bbd"
),
.binaryTarget(
name: "OneSignalCore",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-beta-06/OneSignalCore.xcframework.zip",
checksum: "9e08924dfc49453c75b01389bb8bb2eadb571b53d722a334c0889dc8e0de2348"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0/OneSignalCore.xcframework.zip",
checksum: "cf07a0e4914c21b29f4475e861e11a3ecb6173dbda1592764a03f06127fe4095"
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// "*" in comment line ending comment means the string value has not been changed
// App

#define ONESIGNAL_VERSION @"050000-beta-06"
#define ONESIGNAL_VERSION @"050000"

#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID
#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE
Expand Down
Binary file modified iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>OneSignalCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>OneSignalCore.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -32,19 +29,22 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OneSignalCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// "*" in comment line ending comment means the string value has not been changed
// App

#define ONESIGNAL_VERSION @"050000-beta-06"
#define ONESIGNAL_VERSION @"050000"

#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID
#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE
Expand Down Expand Up @@ -184,9 +184,13 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState;
#define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum]

// OneSignal Background Task Identifiers
#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK"
#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK"
#define USER_MANAGER_BACKGROUND_TASK @"USER_MANAGER_BACKGROUND_TASK"
#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK"
#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK"
#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK"
#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK"
#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_"
#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_"
#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_"

// OneSignal constants
#define OS_PUSH @"push"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
@interface OneSignalLog : NSObject<OSDebug>
+ (Class<OSDebug>)Debug;
+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message;
+ (ONE_S_LOG_LEVEL)getLogLevel;
@end
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</data>
<key>Headers/OneSignalCommonDefines.h</key>
<data>
MXZLANEAOTQvyRNkj2t7WM/fIic=
qfnqLeCZVhgUwqXsfHdKynMmRhA=
</data>
<key>Headers/OneSignalConfigManager.h</key>
<data>
Expand All @@ -94,7 +94,7 @@
</data>
<key>Headers/OneSignalLog.h</key>
<data>
gXplqf6zxHM/zL2vtQV21n+X+Dc=
o5RSmHYkpLQOk/hhVawytbfylUg=
</data>
<key>Headers/OneSignalMobileProvision.h</key>
<data>
Expand Down Expand Up @@ -126,7 +126,7 @@
</data>
<key>Info.plist</key>
<data>
Lyjp8I+wDo/kAOMMY6qAvVZwsYE=
V8UeTZvBi+hwmpifOzEeQp3qBVU=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -265,7 +265,7 @@
<dict>
<key>hash2</key>
<data>
qoq4f92HHuW79wO6hM83Neu0C1ALm7bAvU49uJoffw8=
xRhuRK6MVkVAet5VeHbrrW7yNjGSQc12Kumo/zNS2cE=
</data>
</dict>
<key>Headers/OneSignalConfigManager.h</key>
Expand Down Expand Up @@ -293,7 +293,7 @@
<dict>
<key>hash2</key>
<data>
UvCikpTfTv6mlFdTHq0QCVttUYTRzE/tlMf89cGRNcw=
mBG60JTXM7cBDv7D7ZdAWOJbwxvoG7s2bg5IPmg/ZZM=
</data>
</dict>
<key>Headers/OneSignalMobileProvision.h</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// "*" in comment line ending comment means the string value has not been changed
// App

#define ONESIGNAL_VERSION @"050000-beta-06"
#define ONESIGNAL_VERSION @"050000"

#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID
#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE
Expand Down Expand Up @@ -184,9 +184,13 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState;
#define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum]

// OneSignal Background Task Identifiers
#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK"
#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK"
#define USER_MANAGER_BACKGROUND_TASK @"USER_MANAGER_BACKGROUND_TASK"
#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK"
#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK"
#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK"
#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK"
#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_"
#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_"
#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_"

// OneSignal constants
#define OS_PUSH @"push"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
@interface OneSignalLog : NSObject<OSDebug>
+ (Class<OSDebug>)Debug;
+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message;
+ (ONE_S_LOG_LEVEL)getLogLevel;
@end
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22E261</string>
<string>22F82</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Resources/Info.plist</key>
<data>
RrJplGRYKEP/WRZgiaubv0gdZD0=
nWmlazzXzMNV2iuESh6kPWyaoJg=
</data>
</dict>
<key>files2</key>
Expand Down Expand Up @@ -141,7 +141,7 @@
<dict>
<key>hash2</key>
<data>
qoq4f92HHuW79wO6hM83Neu0C1ALm7bAvU49uJoffw8=
xRhuRK6MVkVAet5VeHbrrW7yNjGSQc12Kumo/zNS2cE=
</data>
</dict>
<key>Headers/OneSignalConfigManager.h</key>
Expand Down Expand Up @@ -169,7 +169,7 @@
<dict>
<key>hash2</key>
<data>
UvCikpTfTv6mlFdTHq0QCVttUYTRzE/tlMf89cGRNcw=
mBG60JTXM7cBDv7D7ZdAWOJbwxvoG7s2bg5IPmg/ZZM=
</data>
</dict>
<key>Headers/OneSignalMobileProvision.h</key>
Expand Down Expand Up @@ -232,7 +232,7 @@
<dict>
<key>hash2</key>
<data>
5kDZvqMywr3IJcAE3eSYETW5SZ1eRriO9ZK0u0pfoIk=
RZRQ2O+hu/Hf7EgiEaTA+P1JA82grTXH9ZuI5CxWvJU=
</data>
</dict>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// "*" in comment line ending comment means the string value has not been changed
// App

#define ONESIGNAL_VERSION @"050000-beta-06"
#define ONESIGNAL_VERSION @"050000"

#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID
#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE
Expand Down Expand Up @@ -184,9 +184,13 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState;
#define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum]

// OneSignal Background Task Identifiers
#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK"
#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK"
#define USER_MANAGER_BACKGROUND_TASK @"USER_MANAGER_BACKGROUND_TASK"
#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK"
#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK"
#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK"
#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK"
#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_"
#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_"
#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_"

// OneSignal constants
#define OS_PUSH @"push"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
@interface OneSignalLog : NSObject<OSDebug>
+ (Class<OSDebug>)Debug;
+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message;
+ (ONE_S_LOG_LEVEL)getLogLevel;
@end
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 738344b

Please sign in to comment.