Skip to content

Commit 5d28976

Browse files
committed
Merge pull request #147 from ishkawa/feature/xcode73
Xcode 7.3 and Swift 2.2 support for 1.x
2 parents df2b922 + 4ff0ffe commit 5d28976

File tree

10 files changed

+31
-10
lines changed

10 files changed

+31
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode7.2
2+
osx_image: xcode7.3
33

44
env:
55
global:

APIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ Pod::Spec.new do |s|
3333
LICENSE
3434
}
3535

36-
s.dependency "Result", "~> 1.0.1"
36+
s.dependency "Result", "~> 2.0.0"
3737
end

APIKit.xcodeproj/project.pbxproj

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727
7F7E8F1D1C8AD4B1008A13A9 /* URLEncodedSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F131C8AD4B1008A13A9 /* URLEncodedSerialization.swift */; };
2828
/* End PBXBuildFile section */
2929

30+
/* Begin PBXContainerItemProxy section */
31+
7F4A73AC1CA839AE002554B1 /* PBXContainerItemProxy */ = {
32+
isa = PBXContainerItemProxy;
33+
containerPortal = 7F45FCD41A94D02C006863BB /* Project object */;
34+
proxyType = 1;
35+
remoteGlobalIDString = 141F12161C1C9ABE0026D415;
36+
remoteInfo = APIKit;
37+
};
38+
/* End PBXContainerItemProxy section */
39+
3040
/* Begin PBXCopyFilesBuildPhase section */
3141
141F12351C1C9AC70026D415 /* Copy Frameworks */ = {
3242
isa = PBXCopyFilesBuildPhase;
@@ -222,6 +232,7 @@
222232
buildRules = (
223233
);
224234
dependencies = (
235+
7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */,
225236
);
226237
name = Tests;
227238
productName = APIKitTests;
@@ -235,7 +246,7 @@
235246
isa = PBXProject;
236247
attributes = {
237248
LastSwiftUpdateCheck = 0700;
238-
LastUpgradeCheck = 0700;
249+
LastUpgradeCheck = 0730;
239250
ORGANIZATIONNAME = "Yosuke Ishikawa";
240251
};
241252
buildConfigurationList = 7F45FCD71A94D02C006863BB /* Build configuration list for PBXProject "APIKit" */;
@@ -303,6 +314,14 @@
303314
};
304315
/* End PBXSourcesBuildPhase section */
305316

317+
/* Begin PBXTargetDependency section */
318+
7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */ = {
319+
isa = PBXTargetDependency;
320+
target = 141F12161C1C9ABE0026D415 /* APIKit */;
321+
targetProxy = 7F4A73AC1CA839AE002554B1 /* PBXContainerItemProxy */;
322+
};
323+
/* End PBXTargetDependency section */
324+
306325
/* Begin XCBuildConfiguration section */
307326
141F12241C1C9ABE0026D415 /* Debug */ = {
308327
isa = XCBuildConfiguration;
@@ -336,6 +355,8 @@
336355
isa = XCBuildConfiguration;
337356
baseConfigurationReference = 141F12101C1C96820026D415 /* Debug.xcconfig */;
338357
buildSettings = {
358+
ENABLE_TESTABILITY = YES;
359+
ONLY_ACTIVE_ARCH = YES;
339360
};
340361
name = Debug;
341362
};

APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.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 = "0720"
3+
LastUpgradeVersion = "0730"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "antitypical/Result" ~> 1.0.1
1+
github "antitypical/Result" ~> 2.0.0

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "AliSoftware/OHHTTPStubs" "4.6.0"
2-
github "antitypical/Result" "1.0.1"
2+
github "antitypical/Result" "2.0.0"

Sources/RequestType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Result
1010
/// - func responseFromObject(object: AnyObject, URLResponse: NSHTTPURLResponse) -> Response?
1111
public protocol RequestType {
1212
/// Type represents a model object
13-
typealias Response
13+
associatedtype Response
1414

1515
/// Configurations of request
1616
var baseURL: NSURL { get }

Sources/URLEncodedSerialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private func escape(string: String) -> String {
2525
while index != string.endIndex {
2626
let startIndex = index
2727
let endIndex = index.advancedBy(batchSize, limit: string.endIndex)
28-
let range = Range(start: startIndex, end: endIndex)
28+
let range = startIndex..<endIndex
2929

3030
let substring = string.substringWithRange(range)
3131

Tests/APIKit/RequestTypeTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ class RequestTypeTests: XCTestCase {
513513
switch request.buildURLRequest() {
514514
case .Success(let urlReq):
515515
XCTAssert(urlReq.HTTPBody != nil)
516-
let json = try! NSJSONSerialization.JSONObjectWithData(urlReq.HTTPBody!, options: NSJSONReadingOptions.AllowFragments)
516+
let json = try! NSJSONSerialization.JSONObjectWithData(urlReq.HTTPBody!, options: NSJSONReadingOptions.AllowFragments) as! [AnyObject]
517517
XCTAssert(json.count == 3)
518518
XCTAssert(json[0]["id"]! == "1")
519519
XCTAssert(json[1]["id"]! == "2")

0 commit comments

Comments
 (0)