Skip to content

Commit 3b121ee

Browse files
Merge pull request #472 from Iterable/tapash/mob-2849-remove-fp
[MOB-2849] - Remove device finger printing.
2 parents 0c35b5d + 479bd73 commit 3b121ee

File tree

10 files changed

+12
-256
lines changed

10 files changed

+12
-256
lines changed

swift-sdk.xcodeproj/project.pbxproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
55CC257B2462064F00A77FD5 /* InAppPresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CC257A2462064F00A77FD5 /* InAppPresenterTests.swift */; };
3333
55D54656239AE5750093ED1E /* LoggingInternal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55D54655239AE5750093ED1E /* LoggingInternal.swift */; };
3434
55E02D39253F8D86009DB8BC /* WebViewProtocolTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E02D38253F8D86009DB8BC /* WebViewProtocolTests.swift */; };
35-
55E6F460238E066400808BCE /* DeferredDeepLinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E6F45D238E066400808BCE /* DeferredDeepLinkTests.swift */; };
3635
55E6F462238E066400808BCE /* DeepLinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E6F45E238E066400808BCE /* DeepLinkTests.swift */; };
3736
AC02480822791E2100495FB9 /* IterableInboxNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC02480722791E2100495FB9 /* IterableInboxNavigationViewController.swift */; };
3837
AC02CAA6234E50B5006617E0 /* RegistrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC02CAA5234E50B5006617E0 /* RegistrationTests.swift */; };
@@ -113,7 +112,6 @@
113112
AC738CE82315A5B600B96B2D /* CommonExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC995F9C2167E9FD0099A184 /* CommonExtensions.swift */; };
114113
AC738CEA2315A8B200B96B2D /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC738CE92315A8B200B96B2D /* MainViewController.swift */; };
115114
AC750A4A234CD67900561902 /* InAppHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC750A49234CD67900561902 /* InAppHelperTests.swift */; };
116-
AC776DA22118B86600C27C27 /* DeviceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC776DA12118B86600C27C27 /* DeviceInfo.swift */; };
117115
AC776DA4211A17C700C27C27 /* IterableRequestUtilTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC776DA3211A17C700C27C27 /* IterableRequestUtilTests.swift */; };
118116
AC776DA6211A1B8A00C27C27 /* IterableRequestUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC776DA5211A1B8A00C27C27 /* IterableRequestUtil.swift */; };
119117
AC78F0E7253D7F09006378A5 /* IterablePushNotificationMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC78F0E6253D7F09006378A5 /* IterablePushNotificationMetadata.swift */; };
@@ -385,7 +383,6 @@
385383
55CC257A2462064F00A77FD5 /* InAppPresenterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InAppPresenterTests.swift; sourceTree = "<group>"; };
386384
55D54655239AE5750093ED1E /* LoggingInternal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggingInternal.swift; sourceTree = "<group>"; };
387385
55E02D38253F8D86009DB8BC /* WebViewProtocolTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewProtocolTests.swift; sourceTree = "<group>"; };
388-
55E6F45D238E066400808BCE /* DeferredDeepLinkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeferredDeepLinkTests.swift; sourceTree = "<group>"; };
389386
55E6F45E238E066400808BCE /* DeepLinkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeepLinkTests.swift; sourceTree = "<group>"; };
390387
AC02480722791E2100495FB9 /* IterableInboxNavigationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableInboxNavigationViewController.swift; sourceTree = "<group>"; };
391388
AC02CAA5234E50B5006617E0 /* RegistrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationTests.swift; sourceTree = "<group>"; };
@@ -463,7 +460,6 @@
463460
AC738CE92315A8B200B96B2D /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
464461
AC74FE1E23A8C0DB004AC442 /* image.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = image.jpg; sourceTree = "<group>"; };
465462
AC750A49234CD67900561902 /* InAppHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InAppHelperTests.swift; sourceTree = "<group>"; };
466-
AC776DA12118B86600C27C27 /* DeviceInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceInfo.swift; sourceTree = "<group>"; };
467463
AC776DA3211A17C700C27C27 /* IterableRequestUtilTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableRequestUtilTests.swift; sourceTree = "<group>"; };
468464
AC776DA5211A1B8A00C27C27 /* IterableRequestUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableRequestUtil.swift; sourceTree = "<group>"; };
469465
AC78F0E6253D7F09006378A5 /* IterablePushNotificationMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterablePushNotificationMetadata.swift; sourceTree = "<group>"; };
@@ -853,7 +849,6 @@
853849
isa = PBXGroup;
854850
children = (
855851
55E6F45E238E066400808BCE /* DeepLinkTests.swift */,
856-
55E6F45D238E066400808BCE /* DeferredDeepLinkTests.swift */,
857852
);
858853
name = "deep-linking-tests";
859854
sourceTree = "<group>";
@@ -921,7 +916,6 @@
921916
AC426CC5211B5527002EDBE8 /* Fp */ = {
922917
isa = PBXGroup;
923918
children = (
924-
AC776DA12118B86600C27C27 /* DeviceInfo.swift */,
925919
AC426CC3211B5497002EDBE8 /* ServerResponse.swift */,
926920
);
927921
name = Fp;
@@ -1779,7 +1773,6 @@
17791773
AC8874AA22178BD80075B54B /* InAppContentParser.swift in Sources */,
17801774
AC50865624C603AC001DC132 /* IterablePersistence.swift in Sources */,
17811775
ACC362BA24D20BBB002C67BA /* IterableAPICallRequest.swift in Sources */,
1782-
AC776DA22118B86600C27C27 /* DeviceInfo.swift in Sources */,
17831776
55B3119B251015CF0056E4FC /* AuthManager.swift in Sources */,
17841777
AC72A0CB20CF4CE2004D7997 /* InternalIterableAPI.swift in Sources */,
17851778
AC72A0C720CF4CE2004D7997 /* CommerceItem.swift in Sources */,
@@ -1829,7 +1822,6 @@
18291822
ACC362B824D17005002C67BA /* IterableRequestTests.swift in Sources */,
18301823
AC2C668720D3435700D46CC9 /* IterableActionRunnerTests.swift in Sources */,
18311824
00CB31B621096129004ACDEC /* TestUtils.swift in Sources */,
1832-
55E6F460238E066400808BCE /* DeferredDeepLinkTests.swift in Sources */,
18331825
AC89661E2124FBCE0051A6CD /* IterableAutoRegistrationTests.swift in Sources */,
18341826
ACA8D1A921965B7D001B1332 /* InAppTests.swift in Sources */,
18351827
00B6FACC210E8484007535CF /* APNSTypeCheckerTests.swift in Sources */,

swift-sdk/Constants.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ import Foundation
66

77
enum Endpoint {
88
private static let apiHostName = "https://api.iterable.com"
9-
private static let linksHostName = "https://links.iterable.com"
109

1110
static let api = Endpoint.apiHostName + Const.apiPath
12-
static let links = linksHostName + "/"
1311
}
1412

1513
enum Const {
@@ -39,7 +37,6 @@ enum Const {
3937
static let updateUser = "users/update"
4038
static let updateEmail = "users/updateEmail"
4139
static let updateSubscriptions = "users/updateSubscriptions"
42-
static let ddlMatch = "a/matchFp" // DDL = Deferred Deep Linking
4340
static let getRemoteConfiguration = "mobile/getRemoteConfiguration"
4441
}
4542

swift-sdk/Internal/DeviceInfo.swift

Lines changed: 0 additions & 64 deletions
This file was deleted.

swift-sdk/Internal/InternalIterableAPI.swift

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
361361

362362
private var config: IterableConfig
363363
private var apiEndPoint: String
364-
private var linksEndPoint: String
365364

366365
// Following are needed for handling pending notification and deep link.
367366
static var pendingNotificationResponse: NotificationResponseProtocol?
@@ -509,15 +508,13 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
509508
launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil,
510509
config: IterableConfig = IterableConfig(),
511510
apiEndPointOverride: String? = nil,
512-
linksEndPointOverride: String? = nil,
513511
dependencyContainer: DependencyContainerProtocol = DependencyContainer()) {
514512
IterableLogUtil.sharedInstance = IterableLogUtil(dateProvider: dependencyContainer.dateProvider, logDelegate: config.logDelegate)
515513
ITBInfo()
516514
self.apiKey = apiKey
517515
self.launchOptions = launchOptions
518516
self.config = config
519517
apiEndPoint = apiEndPointOverride ?? Endpoint.api
520-
linksEndPoint = linksEndPointOverride ?? Endpoint.links
521518
self.dependencyContainer = dependencyContainer
522519
dateProvider = dependencyContainer.dateProvider
523520
networkSession = dependencyContainer.networkSession
@@ -533,8 +530,6 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
533530

534531
updateSDKVersion()
535532

536-
checkForDeferredDeepLink()
537-
538533
// get email and userId from UserDefaults if present
539534
retrieveIdentifierData()
540535

@@ -595,33 +590,6 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
595590
}
596591
}
597592

598-
private func checkForDeferredDeepLink() {
599-
guard config.checkForDeferredDeeplink else {
600-
return
601-
}
602-
guard localStorage.ddlChecked == false else {
603-
return
604-
}
605-
606-
guard let request = IterableRequestUtil.createPostRequest(forApiEndPoint: linksEndPoint,
607-
path: Const.Path.ddlMatch,
608-
headers: [
609-
JsonKey.Header.apiKey: apiKey,
610-
JsonKey.contentType: JsonValue.applicationJson,
611-
],
612-
args: nil,
613-
body: DeviceInfo.createDeviceInfo()) else {
614-
ITBError("Could not create request")
615-
return
616-
}
617-
618-
RequestSender.sendRequest(request, usingSession: networkSession).onSuccess { json in
619-
self.handleDDL(json: json)
620-
}.onError { sendError in
621-
ITBError(sendError.reason)
622-
}
623-
}
624-
625593
private func handleDDL(json: [AnyHashable: Any]) {
626594
if let serverResponse = try? JSONDecoder().decode(ServerResponse.self, from: JSONSerialization.data(withJSONObject: json, options: [])),
627595
serverResponse.isMatch,

swift-sdk/IterableAPI.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ public final class IterableAPI: NSObject {
103103
launchOptions: [UIApplication.LaunchOptionsKey: Any]?,
104104
config: IterableConfig = IterableConfig(),
105105
apiEndPointOverride: String? = nil,
106-
linksEndPointOverride: String? = nil,
107106
callback: ((Bool) -> Void)? = nil) {
108107
internalImplementation = InternalIterableAPI(apiKey: apiKey,
109108
launchOptions: launchOptions,
110109
config: config,
111-
apiEndPointOverride: apiEndPointOverride,
112-
linksEndPointOverride: linksEndPointOverride)
110+
apiEndPointOverride: apiEndPointOverride)
113111
_ = internalImplementation?.start().onSuccess { _ in
114112
callback?(true)
115113
}.onError { _ in

swift-sdk/IterableConfig.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public class IterableConfig: NSObject {
104104

105105
/// When set to true, it will check for deferred deep links on first time app launch
106106
/// after installation from the App Store.
107+
@available(*, deprecated, message: "This flag is no longer supported and will be removed in the next version.")
107108
public var checkForDeferredDeeplink = false
108109

109110
/// Implement the protocol IterableLogDelegate and set it here to change logging.

tests/common/CommonExtensions.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ extension IterableAPI {
126126
launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil,
127127
config: IterableConfig = IterableConfig(),
128128
apiEndPointOverride: String? = nil,
129-
linksEndPointOverride: String? = nil,
130129
dateProvider: DateProviderProtocol = SystemDateProvider(),
131130
networkSession: NetworkSessionProtocol = MockNetworkSession(),
132131
notificationStateProvider: NotificationStateProviderProtocol = SystemNotificationStateProvider(),
@@ -154,7 +153,6 @@ extension IterableAPI {
154153
launchOptions: launchOptions,
155154
config: config,
156155
apiEndPointOverride: apiEndPointOverride,
157-
linksEndPointOverride: linksEndPointOverride,
158156
dependencyContainer: mockDependencyContainer)
159157

160158
internalImplementation?.start().wait()
@@ -167,7 +165,6 @@ extension InternalIterableAPI {
167165
launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil,
168166
config: IterableConfig = IterableConfig(),
169167
apiEndPointOverride: String? = nil,
170-
linksEndPointOverride: String? = nil,
171168
dateProvider: DateProviderProtocol = SystemDateProvider(),
172169
networkSession: NetworkSessionProtocol = MockNetworkSession(),
173170
notificationStateProvider: NotificationStateProviderProtocol = SystemNotificationStateProvider(),
@@ -195,7 +192,6 @@ extension InternalIterableAPI {
195192
launchOptions: launchOptions,
196193
config: config,
197194
apiEndPointOverride: apiEndPointOverride,
198-
linksEndPointOverride: linksEndPointOverride,
199195
dependencyContainer: mockDependencyContainer)
200196

201197
internalImplementation.start().wait()

0 commit comments

Comments
 (0)