Skip to content

Commit 298c027

Browse files
authored
Merge pull request #38 from RxSwiftCommunity/develop
XCode 10 and Swift 4.2
2 parents 3d421d5 + 6e2d2cb commit 298c027

12 files changed

Lines changed: 38 additions & 17 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode9
2+
osx_image: xcode10
33
xcode_project: RxHttpClient.xcodeproj
44

55
env:
@@ -15,7 +15,7 @@ before_install:
1515

1616
before_script:
1717
- carthage version
18-
- carthage checkout --no-use-binaries
18+
- carthage checkout
1919

2020
- mkdir -p ./Carthage/Build/iOS
2121

Cartfile.resolved

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

RxHttpClient.xcodeproj/project.pbxproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
isa = PBXProject;
245245
attributes = {
246246
LastSwiftUpdateCheck = 0730;
247-
LastUpgradeCheck = 0900;
247+
LastUpgradeCheck = 1000;
248248
ORGANIZATIONNAME = RxSwiftCommunity;
249249
TargetAttributes = {
250250
6EFB9EB71D2A4E2600E30A5D = {
@@ -382,12 +382,14 @@
382382
CLANG_WARN_BOOL_CONVERSION = YES;
383383
CLANG_WARN_COMMA = YES;
384384
CLANG_WARN_CONSTANT_CONVERSION = YES;
385+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
385386
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
386387
CLANG_WARN_EMPTY_BODY = YES;
387388
CLANG_WARN_ENUM_CONVERSION = YES;
388389
CLANG_WARN_INFINITE_RECURSION = YES;
389390
CLANG_WARN_INT_CONVERSION = YES;
390391
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
392+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
391393
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
392394
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
393395
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -439,12 +441,14 @@
439441
CLANG_WARN_BOOL_CONVERSION = YES;
440442
CLANG_WARN_COMMA = YES;
441443
CLANG_WARN_CONSTANT_CONVERSION = YES;
444+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
442445
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
443446
CLANG_WARN_EMPTY_BODY = YES;
444447
CLANG_WARN_ENUM_CONVERSION = YES;
445448
CLANG_WARN_INFINITE_RECURSION = YES;
446449
CLANG_WARN_INT_CONVERSION = YES;
447450
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
451+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
448452
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
449453
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
450454
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -499,7 +503,7 @@
499503
SWIFT_OBJC_BRIDGING_HEADER = "RxHttpClient/RxHttpClient-Bridging-Header.h";
500504
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
501505
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
502-
SWIFT_VERSION = 4.0;
506+
SWIFT_VERSION = 4.2;
503507
};
504508
name = Debug;
505509
};
@@ -524,7 +528,7 @@
524528
SKIP_INSTALL = YES;
525529
SWIFT_OBJC_BRIDGING_HEADER = "RxHttpClient/RxHttpClient-Bridging-Header.h";
526530
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
527-
SWIFT_VERSION = 4.0;
531+
SWIFT_VERSION = 4.2;
528532
};
529533
name = Release;
530534
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

RxHttpClient.xcodeproj/xcshareddata/xcschemes/RxHttpClient.xcscheme

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,17 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
29+
onlyGenerateCoverageForSpecifiedTargets = "YES"
3030
shouldUseLaunchSchemeArgsEnv = "YES">
31+
<CodeCoverageTargets>
32+
<BuildableReference
33+
BuildableIdentifier = "primary"
34+
BlueprintIdentifier = "6EFB9EB71D2A4E2600E30A5D"
35+
BuildableName = "RxHttpClient.framework"
36+
BlueprintName = "RxHttpClient"
37+
ReferencedContainer = "container:RxHttpClient.xcodeproj">
38+
</BuildableReference>
39+
</CodeCoverageTargets>
3140
<Testables>
3241
<TestableReference
3342
skipped = "NO">
@@ -56,7 +65,6 @@
5665
buildConfiguration = "Debug"
5766
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5867
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6068
launchStyle = "0"
6169
useCustomWorkingDirectory = "NO"
6270
ignoresPersistentStateOnLaunch = "NO"

RxHttpClientTests/Fake.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class FakeDataTask : NSObject, URLSessionDataTaskType {
66
var originalRequest: URLRequest?
77
var isCancelled = false
88
var resumeInvokeCount = 0
9-
let resumeClosure: (FakeDataTask) -> ()!
9+
let resumeClosure: (FakeDataTask) -> ()?
1010
let cancelClosure: ((FakeDataTask) -> ())?
1111

1212
var state: URLSessionTask.State = URLSessionTask.State.suspended

RxHttpClientTests/HttpClientBasicTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,10 @@ class HttpClientBasicTests: XCTestCase {
255255

256256
func testCreateHttpClientWithCorrectConfiguration() {
257257
let config = URLSessionConfiguration.default
258+
XCTAssertNotEqual(config.httpCookieAcceptPolicy, .always)
258259
config.httpCookieAcceptPolicy = .always
259260
let client = HttpClient(sessionConfiguration: config)
260-
XCTAssertEqual(config, client.urlSession.configuration)
261+
XCTAssertEqual(config.httpCookieAcceptPolicy, client.urlSession.configuration.httpCookieAcceptPolicy)
261262
}
262263

263264
func testCreateHttpClientWithCorrectUrlSession() {

RxHttpClientTests/HttpClientCachingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class HttpClientCachingTests: XCTestCase {
99

1010
override func setUp() {
1111
cacheDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(UUID().uuidString)
12-
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: false, attributes: nil)
12+
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: true, attributes: nil)
1313
client = HttpClient(urlRequestCacheProvider: UrlRequestFileSystemCacheProvider(cacheDirectory: cacheDirectory))
1414
}
1515

RxHttpClientTests/HttpRequestFileSystemCacheProviderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class HttpRequestFileSystemCacheProviderTests: XCTestCase {
2020
var cacheDirectory: URL!
2121
override func setUp() {
2222
cacheDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(UUID().uuidString)
23-
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: false, attributes: nil)
23+
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: true, attributes: nil)
2424
}
2525

2626
override func tearDown() {

RxHttpClientTests/MemoryCacheProviderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class MemoryCacheProviderTests: XCTestCase {
206206

207207
func testSaveDataToSpecificDir() {
208208
let dir = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(UUID().uuidString)
209-
try! FileManager.default.createDirectory(at: dir, withIntermediateDirectories: false, attributes: nil)
209+
try! FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true, attributes: nil)
210210
let provider = MemoryDataCacheProvider(uid: "test")
211211
let testData = "Some test data string".data(using: String.Encoding.utf8)!
212212
provider.append(data: testData)

0 commit comments

Comments
 (0)