Skip to content

Commit

Permalink
Require Swift 5.1. (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshier committed Apr 6, 2020
1 parent f252f5b commit 23f9d34
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 16 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ on:
- hotfix
pull_request:
branches:
- master
- hotfix
- '*'

jobs:
iOS:
name: Test iOS
iOS_5_1:
name: Test iOS (5.1)
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer
Expand All @@ -21,8 +20,24 @@ jobs:
destination: ["OS=13.3,name=iPhone 11 Pro"]
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Dependencies
run: carthage bootstrap --no-use-binaries --platform iOS
- name: iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "AlamofireNetworkActivityIndicator.xcodeproj" -scheme "AlamofireNetworkActivityIndicator" -destination "${{ matrix.destination }}" clean test | xcpretty
iOS_5_2:
name: Test iOS (5.2)
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app/Contents/Developer
strategy:
matrix:
destination: ["OS=13.4,name=iPhone 11 Pro"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: carthage bootstrap --no-use-binaries --platform iOS
- name: iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "AlamofireNetworkActivityIndicator.xcodeproj" -scheme "AlamofireNetworkActivityIndicator" -destination "${{ matrix.destination }}" clean test | xcpretty

2 changes: 1 addition & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

--symlinks ignore
--exclude Carthage
--swiftversion 5
--swiftversion 5.1

# rules
--disable andOperator
Expand Down
6 changes: 3 additions & 3 deletions AlamofireNetworkActivityIndicator.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AlamofireNetworkActivityIndicator'
s.version = '3.0.1'
s.version = '3.1.0'
s.license = 'MIT'
s.summary = 'Controls the visibility of the network activity indicator on iOS using Alamofire'
s.homepage = 'https://github.com/Alamofire/AlamofireNetworkActivityIndicator'
Expand All @@ -13,7 +13,7 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '10.0'

s.swift_versions = ['5.0', '5.1']
s.swift_versions = ['5.1', '5.2']

s.dependency 'Alamofire', '~> 5.0'
s.dependency 'Alamofire', '~> 5.1'
end
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Alamofire/Alamofire" ~> 5.0
github "Alamofire/Alamofire" ~> 5.1
26 changes: 25 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
// swift-tools-version:5.1
//
// Package.swift
//
// Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

import PackageDescription

let package = Package(name: "AlamofireNetworkActivityIndicator",
platforms: [.iOS(.v10)],
products: [.library(name: "AlamofireNetworkActivityIndicator", targets: ["AlamofireNetworkActivityIndicator"])],
dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.0.0")],
dependencies: [.package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.1.0")],
targets: [.target(name: "AlamofireNetworkActivityIndicator",
dependencies: ["Alamofire"],
path: "Source")])
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Controls the visibility of the network activity indicator on iOS using Alamofire
## Requirements

- iOS 10.0+
- Xcode 10.2+
- Swift 5.0+
- Xcode 11+
- Swift 5.1+

## Dependencies

Expand All @@ -41,21 +41,21 @@ Controls the visibility of the network activity indicator on iOS using Alamofire
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby
pod 'AlamofireNetworkActivityIndicator', '~> 3.0'
pod 'AlamofireNetworkActivityIndicator', '~> 3.1'
```

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "Alamofire/AlamofireNetworkActivityIndicator" ~> 3.0
github "Alamofire/AlamofireNetworkActivityIndicator" ~> 3.1
```

### Swift Package Manager (requires Xcode 11)

1. Select File > Swift Packages > Add Package Dependency. Enter `https://github.com/Alamofire/AlamofireNetworkActivityIndicator` in the "Choose Package Repository" dialog.
2. In the next page, specify the version resolving rule as "Up to Next Major" with "3.0.0" as its earliest version.
2. In the next page, specify the version resolving rule as "Up to Next Major" with "3.1.0" as its earliest version.
3. After Xcode checking out the source and resolving the version, you can choose the "AlamofireNetworkActivityIndicator" library and add it to your app target.

### Manually
Expand Down

0 comments on commit 23f9d34

Please sign in to comment.