Skip to content

Commit fda7de7

Browse files
committed
Merge branch 'master' of github.com:Leanplum/Leanplum-iOS-SDK into release/6.0.0
2 parents 9faa81c + d08df6f commit fda7de7

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

LeanplumSDK/LeanplumSDK/Classes/Internal/Leanplum.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,9 @@ + (void)addUIApplicationObservers
11031103
//if they are changed the new valeus will be updated to server as well
11041104
[[Leanplum notificationsManager] updateNotificationSettings];
11051105

1106-
[Leanplum resume];
1106+
if ([Leanplum hasStarted]) {
1107+
[Leanplum resume];
1108+
}
11071109

11081110
// Used for push notifications iOS 9
11091111
[Leanplum notificationsManager].proxy.resumedTimeInterval = [[NSDate date] timeIntervalSince1970];

LeanplumSDK/LeanplumSDK/Classes/Managers/Networking/LPRequestSender.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ - (void)sendRequests
283283
return;
284284
}
285285

286-
[[MigrationManager shared] handleMigrateStateWithMultiApiResponse:json];
287-
288286
// Delete events on success.
289287
[LPRequestBatchFactory deleteFinishedBatch:batch];
290288

@@ -299,6 +297,8 @@ - (void)sendRequests
299297
operation:operation];
300298
}
301299

300+
[[MigrationManager shared] handleMigrateStateWithMultiApiResponse:json];
301+
302302
dispatch_semaphore_signal(semaphore);
303303
LP_END_TRY
304304

LeanplumSDK/LeanplumSDK/ClassesSwift/Migration/MigrationManager+Constants.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import Foundation
1717
static let AttributeMappingsKey = "__leanplum_attribute_mappings"
1818

1919
static let MigrateStateResponseParam = "migrateState"
20-
static let MigrateStateNotificationInfo = "migrateState"
2120
static let SdkResponseParam = "sdk"
2221
static let CTResponseParam = "ct"
2322
static let AccountIdResponseParam = "accountId"
@@ -29,11 +28,6 @@ import Foundation
2928
static let CleverTapRequestArg = "ct"
3029
}
3130

32-
@objc
33-
public class func lpMigrateStateNotificationInfo() -> String {
34-
return Constants.MigrateStateNotificationInfo
35-
}
36-
3731
@objc
3832
public class func lpCleverTapRequestArg() -> String {
3933
return Constants.CleverTapRequestArg

LeanplumSDK/LeanplumSDK/ClassesSwift/Migration/MigrationManager+ResponseHandler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Foundation
1717
key: Constants.MigrateStateResponseParam)
1818
else { return }
1919

20-
if let hash = getValue(dict: migrateState, key: Constants.HashKey) as? String,
20+
if let hash = getValue(dict: migrateState, key: Constants.HashResponseParam) as? String,
2121
hash != self.migrationHash {
2222
Log.debug("[Wrapper] CleverTap Hash changed")
2323
fetchMigrationStateAsync {}
@@ -66,7 +66,7 @@ import Foundation
6666
if let sdk = getValue(dict: apiResponse, key: Constants.SdkResponseParam) as? String {
6767
migrationState = MigrationState(stringValue: sdk)
6868
}
69-
if let hash = getValue(dict: apiResponse, key: Constants.HashKey) as? String {
69+
if let hash = getValue(dict: apiResponse, key: Constants.HashResponseParam) as? String {
7070
migrationHash = hash
7171
}
7272
}

0 commit comments

Comments
 (0)