Skip to content

Commit

Permalink
Upgraded to support SwiftPM 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fraserscottmorrison committed Jul 20, 2020
1 parent cb36326 commit d52b7ad
Show file tree
Hide file tree
Showing 38 changed files with 90 additions and 1,919 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "StatusBarOverlay"
name: "StatusBarOverlay",
platforms: [
.macOS(.v10_10), .iOS(.v8), .tvOS(.v9), .watchOS(.v3)
],
products: [
.library(name: "StatusBarOverlay", targets: ["StatusBarOverlay"])
],
dependencies: [
.package(
url: "https://github.com/ashleymills/Reachability.swift.git",
from: "5.0.0"
)
],
targets: [
.target(name: "StatusBarOverlay", dependencies: ["Reachability"])
],
swiftLanguageVersions: [.v5]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ On the simulator sometimes the hiding event isnt fired. All devices work normall

## Dependencies

* Alamofire is required for the connectivity events
* Reachability is required for the connectivity events

## Get these while stocks last :)

Expand Down
6 changes: 3 additions & 3 deletions Sources/StatusBarOverlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Reachability
fileprivate static var messageHandler:(() -> Void)?

fileprivate var statusBarOverlayViewController:StatusBarOverlayViewController?
fileprivate var reachability = Reachability()
fileprivate var reachability = try? Reachability()

private static let podBundle = Bundle(for: StatusBarOverlay.classForCoder())
private static let bundleUrl = StatusBarOverlay.podBundle.url(forResource: "StatusBarOverlay", withExtension: "bundle")
Expand Down Expand Up @@ -65,7 +65,7 @@ import Reachability
}
}
public static var isReachable: Bool {
return self.shared.reachability?.connection != .none
return self.shared.reachability?.connection != Reachability.Connection.unavailable
}

@objc public static var preferredStatusBarStyle = UIStatusBarStyle.default {
Expand Down Expand Up @@ -344,7 +344,7 @@ import Reachability

/*public class MyReachability {
// backup check as AlamoFire has a bug
// backup check
class func isConnectedToNetwork() -> Bool {
var zeroAddress = sockaddr()
Expand Down
4 changes: 2 additions & 2 deletions StatusBarOverlay.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "StatusBarOverlay"
s.version = "2.2"
s.version = "3.0"
s.summary = "A Status Bar Overlay which will automatically display a No Connection message and can display custom messages too"

s.description = <<-DESC
Expand All @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/IdleHandsApps/StatusBarOverlay.git", :tag => s.version.to_s }

s.source_files = "Sources/*.swift"
s.dependency 'ReachabilitySwift', '~> 4.3'
s.dependency 'ReachabilitySwift', '~> 5.0.0'
s.resource_bundles = { 'StatusBarOverlay' => ["Sources/*.xib", "Sources/*.xcassets"] }

s.framework = "UIKit"
Expand Down
Binary file added StatusBarOverlay/StatusBarOverlay/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion StatusBarOverlay/StatusBarOverlay/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use_frameworks!

target 'StatusBarOverlay' do
# swift
pod 'ReachabilitySwift', '~> 4.3' # https://github.com/ashleymills/Reachability.swift
pod 'ReachabilitySwift', '~> 5.0.0' # https://github.com/ashleymills/Reachability.swift
end

post_install do |installer|
Expand Down
16 changes: 0 additions & 16 deletions StatusBarOverlay/StatusBarOverlay/Pods/Manifest.lock

This file was deleted.

594 changes: 0 additions & 594 deletions StatusBarOverlay/StatusBarOverlay/Pods/Pods.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions StatusBarOverlay/StatusBarOverlay/Pods/ReachabilitySwift/LICENSE

This file was deleted.

Loading

0 comments on commit d52b7ad

Please sign in to comment.