Skip to content

Commit 811f455

Browse files
committed
Updated podspec + linting
1 parent 25895a9 commit 811f455

31 files changed

+48
-94
lines changed

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

AutocompleteClient.xcodeproj/project.pbxproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,6 @@
839839
F64F46B61F59767D0094C697 /* AutocompleteViewModelTests.swift */,
840840
F64F46C21F59A63B0094C697 /* ClosureAutocompleteViewModelDelegate.swift */,
841841
F66B216221DF837700AAB030 /* AutocompleteResultCountTests.swift */,
842-
F67D42AA220360580053B9C3 /* AbstractAutocompleteViewModel.swift */,
843842
);
844843
path = ViewModel;
845844
sourceTree = "<group>";
@@ -1201,6 +1200,7 @@
12011200
children = (
12021201
F61A6B0E1F699E4D007826CA /* Delegate */,
12031202
F1B17CB11F58E5830015FF62 /* AutocompleteResult.swift */,
1203+
F67D42AA220360580053B9C3 /* AbstractAutocompleteViewModel.swift */,
12041204
F68A72F91F56D22B00FA4D1B /* AutocompleteViewModel.swift */,
12051205
F64F46C41F59A6890094C697 /* AutocompleteViewModelDelegate.swift */,
12061206
F63808EE1F5D2F5B00C3B322 /* AutocompleteViewModelSection.swift */,
@@ -1884,7 +1884,7 @@
18841884
PRODUCT_BUNDLE_IDENTIFIER = com.cio.UserApplication;
18851885
PRODUCT_NAME = "$(TARGET_NAME)";
18861886
PROVISIONING_PROFILE_SPECIFIER = "";
1887-
SWIFT_VERSION = 4.2;
1887+
SWIFT_VERSION = 4.0;
18881888
TARGETED_DEVICE_FAMILY = "1,2";
18891889
};
18901890
name = Debug;
@@ -1903,7 +1903,7 @@
19031903
PRODUCT_BUNDLE_IDENTIFIER = com.cio.UserApplication;
19041904
PRODUCT_NAME = "$(TARGET_NAME)";
19051905
PROVISIONING_PROFILE_SPECIFIER = "";
1906-
SWIFT_VERSION = 4.2;
1906+
SWIFT_VERSION = 4.0;
19071907
TARGETED_DEVICE_FAMILY = "1,2";
19081908
};
19091909
name = Release;
@@ -1920,7 +1920,7 @@
19201920
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
19211921
PRODUCT_BUNDLE_IDENTIFIER = com.cio.UserApplicationTests;
19221922
PRODUCT_NAME = "$(TARGET_NAME)";
1923-
SWIFT_VERSION = 3.0;
1923+
SWIFT_VERSION = 4.0;
19241924
TARGETED_DEVICE_FAMILY = "1,2";
19251925
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UserApplication.app/UserApplication";
19261926
};
@@ -1938,7 +1938,7 @@
19381938
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
19391939
PRODUCT_BUNDLE_IDENTIFIER = com.cio.UserApplicationTests;
19401940
PRODUCT_NAME = "$(TARGET_NAME)";
1941-
SWIFT_VERSION = 3.0;
1941+
SWIFT_VERSION = 4.0;
19421942
TARGETED_DEVICE_FAMILY = "1,2";
19431943
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UserApplication.app/UserApplication";
19441944
};
@@ -2031,7 +2031,7 @@
20312031
SDKROOT = iphoneos;
20322032
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
20332033
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
2034-
SWIFT_VERSION = 3.0;
2034+
SWIFT_VERSION = 4.0;
20352035
VERSIONING_SYSTEM = "apple-generic";
20362036
VERSION_INFO_PREFIX = "";
20372037
};
@@ -2084,7 +2084,7 @@
20842084
MTL_ENABLE_DEBUG_INFO = NO;
20852085
SDKROOT = iphoneos;
20862086
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
2087-
SWIFT_VERSION = 3.0;
2087+
SWIFT_VERSION = 4.0;
20882088
VALIDATE_PRODUCT = YES;
20892089
VERSIONING_SYSTEM = "apple-generic";
20902090
VERSION_INFO_PREFIX = "";

AutocompleteClient/FW/Logic/Request/Builder/QueryItemCollection.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct QueryItemCollection {
1313

1414
init() {}
1515

16-
mutating func add(key: String,items: [URLQueryItem]) {
16+
mutating func add(key: String, items: [URLQueryItem]) {
1717
queryItems[key] = items
1818
}
1919

@@ -31,15 +31,15 @@ struct QueryItemCollection {
3131
}
3232
set {
3333
if let newValue = newValue {
34-
if var existingArray = queryItems[value]{
34+
if var existingArray = queryItems[value] {
3535
existingArray.append(contentsOf: newValue)
3636
queryItems[value] = existingArray
3737
} else {
3838
queryItems[value] = newValue
3939
}
4040
} else {
4141
queryItems.removeValue(forKey: value)
42-
}
42+
}
4343
}
4444
}
4545

AutocompleteClient/FW/Logic/Request/Builder/RequestBuilder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ class RequestBuilder {
1515

1616
let baseURL: String
1717

18-
internal(set) var trackData: CIORequestData!
18+
var trackData: CIORequestData!
1919

20-
internal(set) var searchTerm = ""
20+
var searchTerm = ""
2121

2222
init(apiKey: String, dateProvider: DateProvider = CurrentTimeDateProvider(), baseURL: String) {
2323
self.dateProvider = dateProvider

AutocompleteClient/FW/Logic/Request/CIOAutocompleteQuery.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public struct CIOSearchQuery: CIORequestData {
5050
self.query = query.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!
5151
self.filters = filters
5252
self.page = page
53-
self.section = section != nil ? section! : Constants.SearchQuery.defaultSectionName;
53+
self.section = section != nil ? section! : Constants.SearchQuery.defaultSectionName
5454
}
5555

5656
func decorateRequest(requestBuilder: RequestBuilder) {
@@ -60,4 +60,3 @@ public struct CIOSearchQuery: CIORequestData {
6060
requestBuilder.set(searchSection: self.section)
6161
}
6262
}
63-

AutocompleteClient/FW/Logic/Request/CIOTrackConversionData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct CIOTrackConversionData: CIORequestData {
2020
let revenue: Double?
2121

2222
func url(with baseURL: String) -> String {
23-
return String(format: Constants.TrackConversion.format, baseURL, self.searchTerm.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!)
23+
return String(format: Constants.TrackConversion.format, baseURL, self.searchTerm.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!)
2424
}
2525

2626
init(searchTerm: String, itemName: String, customerID: String, sectionName: String? = nil, revenue: Double? = nil) {

AutocompleteClient/FW/Logic/Request/CIOTrackSearchSubmitData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct CIOTrackSearchSubmitData: CIORequestData {
1717
let originalQuery: String
1818
let group: CIOGroup?
1919

20-
func url(with baseURL: String) -> String{
20+
func url(with baseURL: String) -> String {
2121
return String(format: Constants.TrackSearchSubmit.format, baseURL, self.searchTerm.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!)
2222
}
2323

AutocompleteClient/FW/Logic/Result/Search/SearchResultData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension SearchResultData {
3636
self.url = json["url"] as? String
3737

3838
var metadata = json
39-
for key in [ "id", "facets", "groups", "image_url", "quantity", "url" ]{
39+
for key in [ "id", "facets", "groups", "image_url", "quantity", "url" ] {
4040
metadata.removeValue(forKey: key)
4141
}
4242
self.metadata = metadata

AutocompleteClient/FW/Logic/Session/CIOSessionManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CIOSessionManager: SessionManager {
2929

3030
self.sessionLoader = sessionLoader
3131
self.session = self.sessionLoader.loadSession() ?? Session(id: 1, createdAt: dateProvider.provideDate().timeIntervalSince1970)
32-
32+
3333
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
3434
}
3535

AutocompleteClient/FW/UI/DefaultSearchItemCell.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//
88

99
import UIKit
10-
import Foundation
1110

1211
public class DefaultSearchItemCell: UITableViewCell, CIOAutocompleteCell {
1312

0 commit comments

Comments
 (0)