Skip to content

Commit

Permalink
Remove the iAd framework keys that are now unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Enricoza committed Jan 30, 2024
1 parent 1267d8a commit d148cde
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,6 @@ import XCTest
import AppTrackingTransparency
#endif

let attributionValues = Dictionary(uniqueKeysWithValues: AppleInternalKeys.allCases.map { ($0, "mockdata" as NSObject) })
private let mockAppleAttributionData: [String: NSObject] = ["Version3.1": attributionValues as NSObject]

let keyTranslation = [
AppleInternalKeys.attribution: TealiumDataKey.adClickedWithin30D,
AppleInternalKeys.orgName: TealiumDataKey.adOrgName,
AppleInternalKeys.orgId: TealiumDataKey.adOrgId,
AppleInternalKeys.campaignId: TealiumDataKey.adCampaignId,
AppleInternalKeys.campaignName: TealiumDataKey.adCampaignName,
AppleInternalKeys.clickDate: TealiumDataKey.adClickedDate,
AppleInternalKeys.purchaseDate: TealiumDataKey.adPurchaseDate,
AppleInternalKeys.conversionDate: TealiumDataKey.adConversionDate,
AppleInternalKeys.conversionType: TealiumDataKey.adConversionType,
AppleInternalKeys.adId: TealiumDataKey.adId,
AppleInternalKeys.adGroupId: TealiumDataKey.adGroupId,
AppleInternalKeys.adGroupName: TealiumDataKey.adGroupName,
AppleInternalKeys.keyword: TealiumDataKey.adKeyword,
AppleInternalKeys.keywordMatchType: TealiumDataKey.adKeywordMatchType,
AppleInternalKeys.creativeSetId: TealiumDataKey.adCreativeSetId,
AppleInternalKeys.creativeSetName: TealiumDataKey.adCreativeSetName,
AppleInternalKeys.region: TealiumDataKey.adRegion
]

class TealiumAttributionDataTests: XCTestCase {

var defaultConfig: TealiumConfig!
Expand Down
39 changes: 0 additions & 39 deletions tealium/collectors/attribution/AttributionConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,45 +69,6 @@ public struct AttributionKey {
}

public struct AppleInternalKeys {
static let allCases = [
AppleInternalKeys.attribution,
AppleInternalKeys.orgName,
AppleInternalKeys.orgId,
AppleInternalKeys.campaignId,
AppleInternalKeys.campaignName,
AppleInternalKeys.clickDate,
AppleInternalKeys.purchaseDate,
AppleInternalKeys.conversionDate,
AppleInternalKeys.conversionType,
AppleInternalKeys.adId,
AppleInternalKeys.adGroupId,
AppleInternalKeys.adGroupName,
AppleInternalKeys.keyword,
AppleInternalKeys.keywordMatchType,
AppleInternalKeys.creativeSetId,
AppleInternalKeys.creativeSetName,
AppleInternalKeys.region,
]

static let attribution = "iad-attribution"
static let orgName = "iad-org-name"
static let orgId = "iad-org-id" //
static let campaignId = "iad-campaign-id"
static let campaignName = "iad-campaign-name"
static let clickDate = "iad-click-date"
static let purchaseDate = "iad-purchase-date" //
static let conversionDate = "iad-conversion-date"
static let conversionType = "iad-conversion-type" //
static let adId = "iad-ad-id" //
static let adGroupId = "iad-adgroup-id"
static let adGroupName = "iad-adgroup-name"
static let keyword = "iad-keyword"
static let keywordMatchType = "iad-keyword-matchtype" //
static let creativeSetId = "iad-creativeset-id" //
static let creativeSetName = "iad-creativeset-name" //
static let region = "iad-country-or-region" //
static let objectVersion = "Version3.1" // This is the root key for the returned data

enum AAAAttribution: String, CaseIterable {
case conversionType
case attribution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import TealiumCore

public struct PersistentAttributionData: Codable {

// Some of these keys are left here for backwards compatibility.
// Old iAd framework keys might be stored on device and can still be read.
var clickedWithin30D: String?,
clickedDate: String?,
conversionDate: String?,
Expand Down

0 comments on commit d148cde

Please sign in to comment.