Skip to content

Commit

Permalink
Migrates to Xcode 10 & Swift4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
s4cha committed Sep 19, 2018
1 parent e2b091d commit ff256d9
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Alamofire/Alamofire" "4.7.1"
github "freshOS/Arrow" "4.1.0"
github "freshOS/then" "4.0.0"
github "Alamofire/Alamofire" "4.7.3"
github "freshOS/Arrow" "4.2.0"
github "freshOS/then" "4.2.0"
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Alamofire/Alamofire" "4.7.1"
github "freshOS/Arrow" "4.1.0"
github "freshOS/then" "4.0.0"
github "Alamofire/Alamofire" "4.7.3"
github "freshOS/Arrow" "4.2.0"
github "freshOS/then" "4.2.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Alamofire
Submodule Alamofire updated 141 files
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@ use_frameworks!
```

## Swift Version
Swift 2 -> version [**1.3.0**](https://github.com/freshOS/ws/releases/tag/1.3.0)
Swift 3 -> version [**2.0.4**](https://github.com/freshOS/ws/releases/tag/2.0.4)
Swift 4 -> version [**3.0.0**](https://github.com/freshOS/ws/releases/tag/3.0.0)
Swift 4.1 -> version [**3.0.0**](https://github.com/freshOS/ws/releases/tag/3.0.0)
Swift 4.1 -> version [**3.1.0**](https://github.com/freshOS/ws/releases/tag/3.1.0)
Swift 2 -> version [**1.3.0**](https://github.com/freshOS/ws/releases/tag/1.3.0)
Swift 3 -> version [**2.0.4**](https://github.com/freshOS/ws/releases/tag/2.0.4)
Swift 4 -> version [**3.0.0**](https://github.com/freshOS/ws/releases/tag/3.0.0)
Swift 4.1 -> version [**3.1.0**](https://github.com/freshOS/ws/releases/tag/3.1.0)
Swift 4.2 -> version [**3.2.0**](https://github.com/freshOS/ws/releases/tag/3.2.0)

### Backers
Like the project? Offer coffee or support us with a monthly donation and help us continue our activities :)
Expand Down
Binary file modified ws.framework.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions ws.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ws"
s.version = "3.1.0"
s.version = "3.2.0"
s.summary = "Elegant JSON WebService for Swift ☁️"
s.homepage = "https://github.com/freshOS/ws"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand All @@ -10,8 +10,8 @@ Pod::Spec.new do |s|
s.ios.deployment_target = "9.0"
s.source_files = "ws/*.{h,m,swift}"
s.frameworks = "Foundation"
s.dependency 'Arrow', '~> 3.0.5'
s.dependency 'thenPromise', '~> 4.0.0'
s.dependency 'Alamofire', '~> 4.5.1'
s.dependency 'Arrow', '~> 4.2.0'
s.dependency 'thenPromise', '~> 4.2.0'
s.dependency 'Alamofire', '~> 4.7.3'
s.description = "Elegant JSON WebService for Swift - Stop writing boilerplate JSON webservice code and focus on your awesome App instead"
end
10 changes: 6 additions & 4 deletions ws.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -652,6 +653,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -676,7 +678,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -697,7 +699,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -709,7 +711,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.s4cha.ws.wsTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -722,7 +724,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.s4cha.ws.wsTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion ws/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.1.0</string>
<string>3.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions ws/WSNetworkIndicator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class WSNetworkIndicator: NSObject {
runningRequests += 1
// For some unowned reason using scheduledTimer does not work in this case.
let timer = Timer(timeInterval: 1, target: self, selector: #selector(tick), userInfo: nil, repeats: false)
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
}

func stopRequest() {
runningRequests -= 1
// For some unowned reason using scheduledTimer does not work in this case.
let timer = Timer(timeInterval: 0.2, target: self, selector: #selector(tick), userInfo: nil, repeats: false)
RunLoop.main.add(timer, forMode: RunLoopMode.commonModes)
RunLoop.main.add(timer, forMode: RunLoop.Mode.common)
}

@objc
Expand Down
2 changes: 1 addition & 1 deletion wsTests/wsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class WSTests: XCTestCase {

let imgPath = Bundle(for: type(of: self)).path(forResource: "1px", ofType: "jpg")
let img = UIImage(contentsOfFile: imgPath!)
let data = UIImageJPEGRepresentation(img!, 1.0)!
let data = img!.jpegData(compressionQuality: 1.0)!

wsFileIO.postMultipart("", name: "file", data: data, fileName: "file", mimeType: "image/jpeg").then { _ in
exp.fulfill()
Expand Down

0 comments on commit ff256d9

Please sign in to comment.