diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..0a67840 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,40 @@ +name: "Reachability CI" + +on: + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + Pods: + name: Cocoapods Lint (Latest Stable Xcode) + runs-on: macOS-11 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1.4.0 + with: + xcode-version: latest-stable + + - name: Run pod lib lint + run: pod lib lint --fail-fast + + SwiftPM: + name: SwiftPM (Latest Stable Xcode) + runs-on: macOS-11 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1.4.0 + with: + xcode-version: latest-stable + + - name: Build + run: swift build diff --git a/.gitignore b/.gitignore index 9af3db5..4918a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,9 @@ build/ *.mode1v3 *.mode2v3 -xcuserdata \ No newline at end of file +xcuserdata + +# Swift Package Manager +.build/ +.swiftpm/ +Package.resolved diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..ba136c0 --- /dev/null +++ b/Package.swift @@ -0,0 +1,22 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let package = Package( + name: "Reachability", + platforms: [ + .iOS(.v9), + .macOS(.v10_10), + .tvOS(.v9), + ], + products: [ + .library( + name: "Reachability", + targets: ["Reachability"]), + ], + dependencies: [], + targets: [ + .target( + name: "Reachability"), + ] +) diff --git a/README.md b/README.md index 9607033..61c779c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Reference Status](https://www.versioneye.com/objective-c/reachability/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/reachability/references) +[![build-status](https://github.com/tonymillion/Reachability/actions/workflows/CI.yml/badge.svg)](https://github.com/tonymillion/Reachability/actions) # **WARNING** there have been reports of apps being rejected when Reachability is used in a framework. The only solution to this so far is to rename the class. diff --git a/Reachability.podspec b/Reachability.podspec index 15af6f4..1822c0d 100644 --- a/Reachability.podspec +++ b/Reachability.podspec @@ -13,7 +13,7 @@ EOF Pod::Spec.new do |s| s.name = 'Reachability' - s.version = '3.2' + s.version = '3.3' s.summary = 'ARC and GCD Compatible Reachability Class for iOS and OS X. Drop in replacement for Apple Reachability.' s.homepage = 'https://github.com/tonymillion/Reachability' diff --git a/Sources/Reachability/Reachability.m b/Sources/Reachability/Reachability.m new file mode 120000 index 0000000..af87d58 --- /dev/null +++ b/Sources/Reachability/Reachability.m @@ -0,0 +1 @@ +../../Reachability.m \ No newline at end of file diff --git a/Sources/Reachability/include/Reachability.h b/Sources/Reachability/include/Reachability.h new file mode 120000 index 0000000..6f25274 --- /dev/null +++ b/Sources/Reachability/include/Reachability.h @@ -0,0 +1 @@ +../../../Reachability.h \ No newline at end of file