Skip to content

Commit fb12645

Browse files
committed
Update to Swift 5
1 parent 888e104 commit fb12645

6 files changed

Lines changed: 18 additions & 19 deletions

File tree

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "AliSoftware/OHHTTPStubs" "6.0.0"
1+
github "AliSoftware/OHHTTPStubs" "8.0.0"
22
github "ReactiveX/RxSwift" "4.2.0"

RxHttpClient.xcodeproj/project.pbxproj

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,25 +247,26 @@
247247
isa = PBXProject;
248248
attributes = {
249249
LastSwiftUpdateCheck = 0730;
250-
LastUpgradeCheck = 1000;
250+
LastUpgradeCheck = 1020;
251251
ORGANIZATIONNAME = RxSwiftCommunity;
252252
TargetAttributes = {
253253
6EFB9EB71D2A4E2600E30A5D = {
254254
CreatedOnToolsVersion = 7.3;
255-
LastSwiftMigration = 0900;
255+
LastSwiftMigration = 1020;
256256
};
257257
6EFB9EC11D2A4E2600E30A5D = {
258258
CreatedOnToolsVersion = 7.3;
259-
LastSwiftMigration = 0900;
259+
LastSwiftMigration = 1020;
260260
};
261261
};
262262
};
263263
buildConfigurationList = 6EFB9EB21D2A4E2600E30A5D /* Build configuration list for PBXProject "RxHttpClient" */;
264264
compatibilityVersion = "Xcode 3.2";
265-
developmentRegion = English;
265+
developmentRegion = en;
266266
hasScannedForEncodings = 0;
267267
knownRegions = (
268268
en,
269+
Base,
269270
);
270271
mainGroup = 6EFB9EAE1D2A4E2600E30A5D;
271272
productRefGroup = 6EFB9EB91D2A4E2600E30A5D /* Products */;
@@ -377,6 +378,7 @@
377378
isa = XCBuildConfiguration;
378379
buildSettings = {
379380
ALWAYS_SEARCH_USER_PATHS = NO;
381+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
380382
CLANG_ANALYZER_NONNULL = YES;
381383
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
382384
CLANG_CXX_LIBRARY = "libc++";
@@ -436,6 +438,7 @@
436438
isa = XCBuildConfiguration;
437439
buildSettings = {
438440
ALWAYS_SEARCH_USER_PATHS = NO;
441+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
439442
CLANG_ANALYZER_NONNULL = YES;
440443
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
441444
CLANG_CXX_LIBRARY = "libc++";
@@ -506,8 +509,7 @@
506509
SKIP_INSTALL = YES;
507510
SWIFT_OBJC_BRIDGING_HEADER = "RxHttpClient/RxHttpClient-Bridging-Header.h";
508511
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
509-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
510-
SWIFT_VERSION = 4.2;
512+
SWIFT_VERSION = 5.0;
511513
};
512514
name = Debug;
513515
};
@@ -531,8 +533,7 @@
531533
PRODUCT_NAME = "$(TARGET_NAME)";
532534
SKIP_INSTALL = YES;
533535
SWIFT_OBJC_BRIDGING_HEADER = "RxHttpClient/RxHttpClient-Bridging-Header.h";
534-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
535-
SWIFT_VERSION = 4.2;
536+
SWIFT_VERSION = 5.0;
536537
};
537538
name = Release;
538539
};
@@ -549,8 +550,7 @@
549550
PRODUCT_BUNDLE_IDENTIFIER = com.AntonEfimenko.RxHttpClientTests;
550551
PRODUCT_NAME = "$(TARGET_NAME)";
551552
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
552-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
553-
SWIFT_VERSION = 4.0;
553+
SWIFT_VERSION = 5.0;
554554
};
555555
name = Debug;
556556
};
@@ -566,8 +566,7 @@
566566
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
567567
PRODUCT_BUNDLE_IDENTIFIER = com.AntonEfimenko.RxHttpClientTests;
568568
PRODUCT_NAME = "$(TARGET_NAME)";
569-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
570-
SWIFT_VERSION = 4.0;
569+
SWIFT_VERSION = 5.0;
571570
};
572571
name = Release;
573572
};

RxHttpClient.xcodeproj/xcshareddata/xcschemes/RxHttpClient.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

RxHttpClient/Data+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Foundation
33
extension Data {
44
func sha1() -> String {
55
var digest = [UInt8](repeating: 0, count:Int(CC_SHA1_DIGEST_LENGTH))
6-
withUnsafeBytes { _ = CC_SHA1($0, CC_LONG(count), &digest) }
6+
withUnsafeBytes { _ = CC_SHA1($0.baseAddress, CC_LONG(count), &digest) }
77
let hexBytes = digest.map { String(format: "%02hhx", $0) }
88
return hexBytes.joined()
99
}

RxHttpClient/DataCacheProviderType.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public extension DataCacheProviderType {
5151
If nil, extension will be inferred by MIME type, if inferring fails, extension will be "dat"
5252
- returns: NSURL for saved file or nil, if file not saved
5353
*/
54-
public func saveData(fileExtension: String?) -> URL? {
54+
func saveData(fileExtension: String?) -> URL? {
5555
return saveData(destinationDirectory: URL(fileURLWithPath: NSTemporaryDirectory()), fileExtension: fileExtension)
5656
}
5757

@@ -60,7 +60,7 @@ public extension DataCacheProviderType {
6060
Extension will be inferred by MIME type, if inferring fails, extension will be "dat"
6161
- returns: NSURL for saved file or nil, if file not saved
6262
*/
63-
public func saveData() -> URL? {
63+
func saveData() -> URL? {
6464
return saveData(fileExtension: nil)
6565
}
6666

@@ -70,7 +70,7 @@ public extension DataCacheProviderType {
7070
- parameter destinationDirectory: NSURL of directory, where data will be saved
7171
- returns: NSURL for saved file or nil, if file not saved
7272
*/
73-
public func saveData(destinationDirectory: URL) -> URL? {
73+
func saveData(destinationDirectory: URL) -> URL? {
7474
return saveData(destinationDirectory: destinationDirectory, fileExtension: nil)
7575
}
7676

cartfile.private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "AliSoftware/OHHTTPStubs" == 6.0.0
1+
github "AliSoftware/OHHTTPStubs" == 8.0.0

0 commit comments

Comments
 (0)