Skip to content

Commit 6e1ba68

Browse files
committed
small bug fixes
* Fix OSRemoteParamController bug where it is nil * Fix removeAliases bug
1 parent 6ceb44c commit 6e1ba68

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

iOS_SDK/OneSignalSDK/OneSignalCore/Source/RemoteParameters/OSRemoteParamController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ @implementation OSRemoteParamController
3535

3636
static OSRemoteParamController *_sharedController;
3737
+ (OSRemoteParamController *)sharedController {
38+
if (!_sharedController)
39+
_sharedController = [OSRemoteParamController new];
3840
return _sharedController;
3941
}
4042

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSIdentityModel.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,10 @@ class OSIdentityModel: OSModel {
8282
}
8383

8484
func removeAliases(_ labels: [String]) {
85-
var aliasesToSend: [String: String] = [:]
8685
for label in labels {
8786
self.aliases.removeValue(forKey: label)
88-
aliasesToSend[label] = ""
87+
self.set(property: "aliases", newValue: [label: ""])
8988
}
90-
self.set(property: "aliases", newValue: aliasesToSend)
9189
}
9290

9391
public override func hydrateModel(_ response: [String: Any]) {

iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionOperationExecutor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class OSSubscriptionOperationExecutor: OSOperationExecutor {
5959

6060
var requestQueue: [OSRequestCreateSubscription] = []
6161

62-
if var cachedAddRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestCreateSubscription] {
62+
if let cachedAddRequestQueue = OneSignalUserDefaults.initShared().getSavedCodeableData(forKey: OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY, defaultValue: []) as? [OSRequestCreateSubscription] {
6363
// Hook each uncached Request to the model in the store
6464
for request in cachedAddRequestQueue {
6565
// 1. Hook up the subscription model

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ + (void)startUserManager {
519519
}
520520

521521
+ (void)delayInitializationForPrivacyConsent {
522-
[OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Delayed initialization of the OneSignal SDK until the user provides privacy consent using the consentGranted() method"];
522+
[OneSignalLog onesignalLog:ONE_S_LL_VERBOSE message:@"Delayed initialization of the OneSignal SDK until the user provides privacy consent using the setPrivacyConsent() method"];
523523
delayedInitializationForPrivacyConsent = true;
524524
_delayedInitParameters = [[DelayedConsentInitializationParameters alloc] initWithLaunchOptions:launchOptions withAppId:appId];
525525
// Init was not successful, set appId back to nil

0 commit comments

Comments
 (0)