Skip to content

Commit 2faa66c

Browse files
authored
Fix migration hash (#525)
* Fix migration hash * Remove unused code
1 parent e83951c commit 2faa66c

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

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)