Skip to content

Commit fa17677

Browse files
committed
Merge branch 'master' into MOB-2388-resync-messages-JWT
2 parents f605886 + 19be619 commit fa17677

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

swift-sdk/Internal/ApiClient.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class ApiClient {
6161

6262
return .success(RequestCreator(apiKey: apiKey, auth: authProvider.auth, deviceMetadata: deviceMetadata))
6363
}
64-
6564

6665
private func createIterableHeaders() -> [String: String] {
6766
var headers = [JsonKey.contentType.jsonKey: JsonValue.applicationJson.jsonStringValue,

swift-sdk/Internal/RequestCreator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ struct RequestCreator {
206206

207207
var args: [AnyHashable: Any] = [JsonKey.InApp.count: count.description,
208208
JsonKey.platform.jsonKey: JsonValue.iOS.jsonStringValue,
209+
JsonKey.systemVersion.jsonKey: UIDevice.current.systemVersion,
209210
JsonKey.InApp.sdkVersion: IterableAPI.sdkVersion]
210211

211212
if let packageName = Bundle.main.appPackageName {

swift-sdk/IterableAPI.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ public final class IterableAPI: NSObject {
129129
@objc(handleUniversalLink:)
130130
@discardableResult
131131
public static func handle(universalLink url: URL) -> Bool {
132-
internalImplementation?.handleUniversalLink(url) ?? false
132+
if let internalImplementation = internalImplementation {
133+
return internalImplementation.handleUniversalLink(url)
134+
} else {
135+
IterableAPIInternal.pendingUniversalLink = url
136+
return false
137+
}
133138
}
134139

135140
/// Add an entry in the device attributes

tests/swift-sdk-swift-tests/RequestCreatorTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ class RequestCreatorTests: XCTestCase {
175175
XCTAssertEqual(args[JsonKey.email.jsonKey], auth.email)
176176
XCTAssertEqual(args[JsonKey.InApp.packageName], Bundle.main.appPackageName)
177177
XCTAssertEqual(args[JsonKey.InApp.count], inAppMessageRequestCount.stringValue)
178+
XCTAssertEqual(args[JsonKey.systemVersion.jsonKey], UIDevice.current.systemVersion)
178179
}
179180

180181
func testTrackEventRequest() {

0 commit comments

Comments
 (0)