Skip to content

Commit 5711fbe

Browse files
We are now passing bundle-id as 'packageName' to getInAppMessages call.
1 parent 4e1bc94 commit 5711fbe

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ class IterableAPITests: XCTestCase {
548548
(name: AnyHashable.ITBL_KEY_COUNT, value: 1.description),
549549
(name: AnyHashable.ITBL_KEY_PLATFORM, value: .ITBL_PLATFORM_IOS),
550550
(name: AnyHashable.ITBL_KEY_SDK_VERSION, value: IterableAPI.sdkVersion),
551+
(name: AnyHashable.ITBL_KEY_PACKAGE_NAME, value: Bundle.main.appPackageName!),
551552
]
552553
TestUtils.validate(request: networkSession.request!,
553554
requestType: .get,

swift-sdk/ITBConsts.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public extension AnyHashable {
5050
static let ITBL_KEY_MESSAGE_ID = "messageId"
5151
static let ITBL_KEY_NEW_EMAIL = "newEmail"
5252
static let ITBL_KEY_PLATFORM = "platform"
53+
static let ITBL_KEY_PACKAGE_NAME = "packageName"
5354
static let ITBL_KEY_SDK_VERSION = "SDKVersion"
5455
static let ITBL_KEY_TOKEN = "token"
5556
static let ITBL_KEY_TEMPLATE_ID = "templateId"

swift-sdk/Internal/IterableAPIInternal.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ final class IterableAPIInternal : NSObject, PushTrackerProtocol {
418418
AnyHashable.ITBL_KEY_PLATFORM: String.ITBL_PLATFORM_IOS,
419419
AnyHashable.ITBL_KEY_SDK_VERSION: IterableAPI.sdkVersion
420420
]
421+
if let packageName = Bundle.main.appPackageName {
422+
args[AnyHashable.ITBL_KEY_PACKAGE_NAME] = packageName
423+
}
421424

422425
addEmailOrUserId(args: &args)
423426

0 commit comments

Comments
 (0)