Skip to content

Commit b0ab93f

Browse files
Merge pull request #17 from Iterable/bugfix/ITBL-5860
[ITBL-5860] - set class for deserialization
2 parents 816178f + 5bd7f20 commit b0ab93f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Tests/swift-sdk-swift-tests/IterableAPITests.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class IterableAPITests: XCTestCase {
6363
XCTFail()
6464
}
6565

66-
wait(for: [expectation], timeout: 5.0)
66+
wait(for: [expectation], timeout: testExpectationTimeout)
6767
}
6868

6969
func testTrackEventBadNetwork() {
@@ -83,7 +83,7 @@ class IterableAPITests: XCTestCase {
8383
},
8484
onFailure: {(reason, data) in expectation.fulfill()})
8585

86-
wait(for: [expectation], timeout: 5.0)
86+
wait(for: [expectation], timeout: testExpectationTimeout)
8787
}
8888

8989
func testUpdateUser() {
@@ -105,7 +105,7 @@ class IterableAPITests: XCTestCase {
105105
expectation.fulfill()
106106
}
107107

108-
wait(for: [expectation], timeout: 5.0)
108+
wait(for: [expectation], timeout: testExpectationTimeout)
109109
}
110110

111111
func testUpdateEmail() {
@@ -132,6 +132,6 @@ class IterableAPITests: XCTestCase {
132132
XCTFail()
133133
})
134134

135-
wait(for: [expectation], timeout: 5.0)
135+
wait(for: [expectation], timeout: testExpectationTimeout)
136136
}
137137
}

swift-sdk/IterableAPIInternal.swift

+3
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,9 @@ import Foundation
858858

859859
// super init
860860
super.init()
861+
862+
// Fix for NSArchiver bug
863+
NSKeyedUnarchiver.setClass(IterableAttributionInfo.self, forClassName: "IterableAttributionInfo")
861864

862865
// get email and userId from UserDefaults if present
863866
retrieveEmailAndUserId()

0 commit comments

Comments
 (0)