Skip to content

Commit 3bbc6f5

Browse files
Merge pull request #459 from Iterable/tapash/mob-2626-rename
[MOB-2626] - Rename IterableAPIInternal => InternalIterableAPI
2 parents f07241b + 8e391c4 commit 3bbc6f5

33 files changed

+210
-210
lines changed

swift-sdk.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
AC72A0C820CF4CE2004D7997 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0BE20CF4CB8004D7997 /* Constants.swift */; };
103103
AC72A0C920CF4CE2004D7997 /* IterableAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0BF20CF4CB8004D7997 /* IterableAction.swift */; };
104104
AC72A0CA20CF4CE2004D7997 /* IterableActionRunner.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0C420CF4CB8004D7997 /* IterableActionRunner.swift */; };
105-
AC72A0CB20CF4CE2004D7997 /* IterableAPIInternal.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0C520CF4CB9004D7997 /* IterableAPIInternal.swift */; };
105+
AC72A0CB20CF4CE2004D7997 /* InternalIterableAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0C520CF4CB9004D7997 /* InternalIterableAPI.swift */; };
106106
AC72A0CD20CF4CE2004D7997 /* IterableAppIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0C620CF4CB9004D7997 /* IterableAppIntegration.swift */; };
107107
AC72A0CE20CF4CE2004D7997 /* IterableAttributionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0C020CF4CB8004D7997 /* IterableAttributionInfo.swift */; };
108108
AC72A0D120CF4D0B004D7997 /* InAppHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC72A0AA20CF4BEB004D7997 /* InAppHelper.swift */; };
@@ -458,7 +458,7 @@
458458
AC72A0C020CF4CB8004D7997 /* IterableAttributionInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableAttributionInfo.swift; sourceTree = "<group>"; };
459459
AC72A0C120CF4CB8004D7997 /* CommerceItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommerceItem.swift; sourceTree = "<group>"; };
460460
AC72A0C420CF4CB8004D7997 /* IterableActionRunner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableActionRunner.swift; sourceTree = "<group>"; };
461-
AC72A0C520CF4CB9004D7997 /* IterableAPIInternal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableAPIInternal.swift; sourceTree = "<group>"; };
461+
AC72A0C520CF4CB9004D7997 /* InternalIterableAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InternalIterableAPI.swift; sourceTree = "<group>"; };
462462
AC72A0C620CF4CB9004D7997 /* IterableAppIntegration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IterableAppIntegration.swift; sourceTree = "<group>"; };
463463
AC738CE92315A8B200B96B2D /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
464464
AC74FE1E23A8C0DB004AC442 /* image.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = image.jpg; sourceTree = "<group>"; };
@@ -1001,7 +1001,7 @@
10011001
55298B222501A5AB00190BAE /* AuthManager.swift */,
10021002
AC2C667D20D3111900D46CC9 /* DateProvider.swift */,
10031003
AC72A0C420CF4CB8004D7997 /* IterableActionRunner.swift */,
1004-
AC72A0C520CF4CB9004D7997 /* IterableAPIInternal.swift */,
1004+
AC72A0C520CF4CB9004D7997 /* InternalIterableAPI.swift */,
10051005
AC2C668120D32F2800D46CC9 /* IterableAppIntegrationInternal.swift */,
10061006
AC72A0BD20CF4C98004D7997 /* IterableDeepLinkManager.swift */,
10071007
AC2B79F621E6A38900A59080 /* NotificationHelper.swift */,
@@ -1770,7 +1770,7 @@
17701770
ACC362BA24D20BBB002C67BA /* IterableAPICallRequest.swift in Sources */,
17711771
AC776DA22118B86600C27C27 /* DeviceInfo.swift in Sources */,
17721772
55B3119B251015CF0056E4FC /* AuthManager.swift in Sources */,
1773-
AC72A0CB20CF4CE2004D7997 /* IterableAPIInternal.swift in Sources */,
1773+
AC72A0CB20CF4CE2004D7997 /* InternalIterableAPI.swift in Sources */,
17741774
AC72A0C720CF4CE2004D7997 /* CommerceItem.swift in Sources */,
17751775
AC31B040232AB42100BE25EB /* InboxSessionManager.swift in Sources */,
17761776
ACE34AB321376B1000691224 /* UserDefaultsLocalStorage.swift in Sources */,

swift-sdk/Internal/InboxViewControllerViewModel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class InboxViewControllerViewModel: InboxViewControllerViewModelProtocol {
4545
sectionedMessages = sortAndFilter(messages: allMessagesInSections())
4646
}
4747

48-
init(internalAPIProvider: @escaping @autoclosure () -> IterableAPIInternal? = IterableAPI.internalImplementation) {
48+
init(internalAPIProvider: @escaping @autoclosure () -> InternalIterableAPI? = IterableAPI.internalImplementation) {
4949
ITBInfo()
5050

5151
self.internalAPIProvider = internalAPIProvider
@@ -302,7 +302,7 @@ class InboxViewControllerViewModel: InboxViewControllerViewModelProtocol {
302302
sectionedMessages.values
303303
}
304304

305-
private var internalAPI: IterableAPIInternal? {
305+
private var internalAPI: InternalIterableAPI? {
306306
internalAPIProvider()
307307
}
308308

@@ -313,7 +313,7 @@ class InboxViewControllerViewModel: InboxViewControllerViewModelProtocol {
313313
private var sectionedMessages = SectionedValues<Int, InboxMessageViewModel>()
314314
private var newSectionedMessages = SectionedValues<Int, InboxMessageViewModel>()
315315
private var sessionManager = InboxSessionManager()
316-
private var internalAPIProvider: () -> IterableAPIInternal?
316+
private var internalAPIProvider: () -> InternalIterableAPI?
317317

318318
private var internalInAppManager: IterableInternalInAppManagerProtocol? {
319319
internalAPI?.inAppManager

swift-sdk/Internal/IterableAPIInternal.swift renamed to swift-sdk/Internal/InternalIterableAPI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
import UIKit
77
import UserNotifications
88

9-
final class IterableAPIInternal: NSObject, PushTrackerProtocol, AuthProvider {
9+
final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
1010
var apiKey: String
1111

1212
var email: String? {
@@ -684,7 +684,7 @@ final class IterableAPIInternal: NSObject, PushTrackerProtocol, AuthProvider {
684684

685685
// MARK: - DEPRECATED
686686

687-
extension IterableAPIInternal {
687+
extension InternalIterableAPI {
688688
// deprecated - will be removed in version 6.3.x or above
689689
@discardableResult
690690
func trackInAppOpen(_ messageId: String,

swift-sdk/Internal/IterableHtmlMessageViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class IterableHtmlMessageViewController: UIViewController {
5555
weak var presenter: InAppPresenter?
5656

5757
init(parameters: Parameters,
58-
internalAPIProvider: @escaping @autoclosure () -> IterableAPIInternal? = IterableAPI.internalImplementation,
58+
internalAPIProvider: @escaping @autoclosure () -> InternalIterableAPI? = IterableAPI.internalImplementation,
5959
webViewProvider: @escaping @autoclosure () -> WebViewProtocol = IterableHtmlMessageViewController.createWebView()) {
6060
ITBInfo()
6161
self.internalAPIProvider = internalAPIProvider
@@ -144,7 +144,7 @@ class IterableHtmlMessageViewController: UIViewController {
144144
ITBInfo()
145145
}
146146

147-
private var internalAPIProvider: () -> IterableAPIInternal?
147+
private var internalAPIProvider: () -> InternalIterableAPI?
148148
private var webViewProvider: () -> WebViewProtocol
149149
private var parameters: Parameters
150150
private let futureClickedURL: Promise<URL, IterableError>
@@ -153,7 +153,7 @@ class IterableHtmlMessageViewController: UIViewController {
153153
private var clickedLink: String?
154154

155155
private lazy var webView = webViewProvider()
156-
private var internalAPI: IterableAPIInternal? {
156+
private var internalAPI: InternalIterableAPI? {
157157
internalAPIProvider()
158158
}
159159

@@ -296,7 +296,7 @@ extension IterableHtmlMessageViewController: WKNavigationDelegate {
296296
decisionHandler(.cancel)
297297
}
298298

299-
private static func trackClickOnDismiss(internalAPI: IterableAPIInternal?,
299+
private static func trackClickOnDismiss(internalAPI: InternalIterableAPI?,
300300
params: Parameters,
301301
futureClickedURL: Promise<URL, IterableError>,
302302
withURL url: URL,

swift-sdk/Internal/OnlineRequestProcessor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import Foundation
66

7-
/// `IterableAPIinternal` will delegate all network related calls to this struct.
7+
/// `InternalIterableAPI` will delegate all network related calls to this struct.
88
struct OnlineRequestProcessor: RequestProcessorProtocol {
99
init(apiKey: String,
1010
authProvider: AuthProvider?,

swift-sdk/Internal/RequestHandlerProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import Foundation
66

7-
/// `IterableAPIinternal` will delegate all network related calls to this protocol.
7+
/// `InternalIterableAPI` will delegate all network related calls to this protocol.
88
protocol RequestHandlerProtocol: class {
99
var offlineMode: Bool { get set }
1010

swift-sdk/IterableAPI.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public final class IterableAPI: NSObject {
105105
apiEndPointOverride: String? = nil,
106106
linksEndPointOverride: String? = nil,
107107
callback: ((Bool) -> Void)? = nil) {
108-
internalImplementation = IterableAPIInternal(apiKey: apiKey,
108+
internalImplementation = InternalIterableAPI(apiKey: apiKey,
109109
launchOptions: launchOptions,
110110
config: config,
111111
apiEndPointOverride: apiEndPointOverride,
@@ -135,7 +135,7 @@ public final class IterableAPI: NSObject {
135135
if let internalImplementation = internalImplementation {
136136
return internalImplementation.handleUniversalLink(url)
137137
} else {
138-
IterableAPIInternal.pendingUniversalLink = url
138+
InternalIterableAPI.pendingUniversalLink = url
139139
return false
140140
}
141141
}
@@ -616,7 +616,7 @@ public final class IterableAPI: NSObject {
616616

617617
// MARK: - Private/Internal
618618

619-
static var internalImplementation: IterableAPIInternal?
619+
static var internalImplementation: InternalIterableAPI?
620620

621621
override private init() { super.init() }
622622
}

swift-sdk/IterableAppIntegration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import UserNotifications
4949
didReceive: UserNotificationResponse(response: response),
5050
withCompletionHandler: completionHandler)
5151
} else {
52-
IterableAPIInternal.pendingNotificationResponse = UserNotificationResponse(response: response)
52+
InternalIterableAPI.pendingNotificationResponse = UserNotificationResponse(response: response)
5353
}
5454
}
5555

tests/common/CommonExtensions.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ extension IterableAPI {
150150
notificationCenter: notificationCenter,
151151
apnsTypeChecker: apnsTypeChecker)
152152

153-
internalImplementation = IterableAPIInternal(apiKey: apiKey,
153+
internalImplementation = InternalIterableAPI(apiKey: apiKey,
154154
launchOptions: launchOptions,
155155
config: config,
156156
apiEndPointOverride: apiEndPointOverride,
@@ -161,7 +161,7 @@ extension IterableAPI {
161161
}
162162
}
163163

164-
extension IterableAPIInternal {
164+
extension InternalIterableAPI {
165165
// Internal Only used in unit tests.
166166
@discardableResult static func initializeForTesting(apiKey: String = "zeeApiKey",
167167
launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil,
@@ -178,7 +178,7 @@ extension IterableAPIInternal {
178178
urlOpener: UrlOpenerProtocol = MockUrlOpener(),
179179
applicationStateProvider: ApplicationStateProviderProtocol = UIApplication.shared,
180180
notificationCenter: NotificationCenterProtocol = NotificationCenter.default,
181-
apnsTypeChecker: APNSTypeCheckerProtocol = APNSTypeChecker()) -> IterableAPIInternal {
181+
apnsTypeChecker: APNSTypeCheckerProtocol = APNSTypeChecker()) -> InternalIterableAPI {
182182
let mockDependencyContainer = MockDependencyContainer(dateProvider: dateProvider,
183183
networkSession: networkSession,
184184
notificationStateProvider: notificationStateProvider,
@@ -191,7 +191,7 @@ extension IterableAPIInternal {
191191
notificationCenter: notificationCenter,
192192
apnsTypeChecker: apnsTypeChecker)
193193

194-
let internalImplementation = IterableAPIInternal(apiKey: apiKey,
194+
let internalImplementation = InternalIterableAPI(apiKey: apiKey,
195195
launchOptions: launchOptions,
196196
config: config,
197197
apiEndPointOverride: apiEndPointOverride,

tests/common/CommonMocks.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class MockInAppFetcher: InAppFetcherProtocol {
308308
return Promise(value: messagesMap.values)
309309
}
310310

311-
@discardableResult func mockMessagesAvailableFromServer(internalApi: IterableAPIInternal?, messages: [IterableInAppMessage]) -> Future<Int, Error> {
311+
@discardableResult func mockMessagesAvailableFromServer(internalApi: InternalIterableAPI?, messages: [IterableInAppMessage]) -> Future<Int, Error> {
312312
ITBInfo()
313313

314314
messagesMap = OrderedDictionary<String, IterableInAppMessage>()
@@ -327,7 +327,7 @@ class MockInAppFetcher: InAppFetcherProtocol {
327327
return result
328328
}
329329

330-
@discardableResult func mockInAppPayloadFromServer(internalApi: IterableAPIInternal?, _ payload: [AnyHashable: Any]) -> Future<Int, Error> {
330+
@discardableResult func mockInAppPayloadFromServer(internalApi: InternalIterableAPI?, _ payload: [AnyHashable: Any]) -> Future<Int, Error> {
331331
ITBInfo()
332332
return mockMessagesAvailableFromServer(internalApi: internalApi, messages: InAppTestHelper.inAppMessages(fromPayload: payload))
333333
}

0 commit comments

Comments
 (0)