diff --git a/.swift-version b/.swift-version index cb2b00e4..8c50098d 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0.1 +3.1 diff --git a/.travis.yml b/.travis.yml index 1d6699ff..ddb9164c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ matrix: include: - os: osx language: objective-c - osx_image: xcode8.1 + osx_image: xcode8.3 script: - set -o pipefail - xcodebuild build-for-testing test-without-building -workspace APIKit.xcworkspace -scheme APIKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c @@ -16,7 +16,7 @@ matrix: - bash <(curl -s https://codecov.io/bash) - os: osx language: generic - osx_image: xcode8.1 + osx_image: xcode8.3 script: - swift build - swift test diff --git a/README.md b/README.md index 2ffdf892..6dd793e3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ APIKit [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Version](https://img.shields.io/cocoapods/v/APIKit.svg?style=flat)](http://cocoadocs.org/docsets/APIKit) [![Platform](https://img.shields.io/cocoapods/p/APIKit.svg?style=flat)](http://cocoadocs.org/docsets/APIKit) - +[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) APIKit is a type-safe networking abstraction layer that associates request type with response type. @@ -30,7 +30,7 @@ Session.send(request) { result in ## Requirements -- Swift 3.0 +- Swift 3.0 or later - iOS 8.0 or later - Mac OS 10.10 or later - watchOS 2.0 or later @@ -42,13 +42,13 @@ If you use Swift 2.2 or 2.3, try [APIKit 2.0.5](https://github.com/ishkawa/APIKi #### [Carthage](https://github.com/Carthage/Carthage) -- Insert `github "ishkawa/APIKit" ~> 3.0` to your Cartfile. +- Insert `github "ishkawa/APIKit" ~> 3.1` to your Cartfile. - Run `carthage update`. - Link your app with `APIKit.framework` and `Result.framework` in `Carthage/Build`. #### [CocoaPods](https://github.com/cocoapods/cocoapods) -- Insert `pod 'APIKit', '~> 3.0'` to your Podfile. +- Insert `pod 'APIKit', '~> 3.1'` to your Podfile. - Run `pod install`. Note: CocoaPods 1.1.0 is required to install APIKit 3. diff --git a/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift b/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift index 26947598..3253c6d8 100644 --- a/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift +++ b/Sources/APIKit/BodyParameters/MultipartFormDataBodyParameters.swift @@ -18,7 +18,7 @@ import Foundation public struct MultipartFormDataBodyParameters: BodyParameters { /// `EntityType` represents wheather the entity is expressed as `Data` or `InputStream`. public enum EntityType { - /// Expresses the entity as `Data`, which has faster upload speed and lager memory usage. + /// Expresses the entity as `Data`, which has faster upload speed and larger memory usage. case data /// Expresses the entity as `InputStream`, which has smaller memory usage and slower upload speed. @@ -86,7 +86,7 @@ public extension MultipartFormDataBodyParameters { self.count = data.count } - /// Returns Part instance that has input stream of specifed data. + /// Returns Part instance that has input stream of specified data. /// If `mimeType` or `fileName` are `nil`, the fields will be omitted. public init(data: Data, name: String, mimeType: String? = nil, fileName: String? = nil) { self.inputStream = InputStream(data: data) @@ -96,7 +96,7 @@ public extension MultipartFormDataBodyParameters { self.count = data.count } - /// Returns Part instance that has input stream of specifed file URL. + /// Returns Part instance that has input stream of specified file URL. /// If `mimeType` or `fileName` are `nil`, values for the fields will be detected from URL. public init(fileURL: URL, name: String, mimeType: String? = nil, fileName: String? = nil) throws { guard let inputStream = InputStream(url: fileURL) else {