Skip to content

Commit

Permalink
Release 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbutler committed Jul 30, 2021
1 parent 64e2f53 commit 8b5d46a
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 46 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.1.0] - 2021-07-30
### Added
- Support for determining connection state of Ethernet connections
### Changed
- Support compilation under Xcode 12.5.1.
- OHHTTPStubs 8.0.0 -> 9.1.0 for testing
- Updated documentation in README.md
- Headers search path added to Package.swift with thanks to @larryonoff

## [5.0.0] - 2020-09-15
### Added
- Support for Xcode 12.
Expand Down
2 changes: 1 addition & 1 deletion Connectivity.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Connectivity'
s.version = '5.0.0'
s.version = '5.1.0'
s.swift_version = '5.0'
s.summary = 'Makes Internet connectivity detection more robust by detecting Wi-Fi networks without Internet access.'
s.description = <<-DESC
Expand Down
8 changes: 8 additions & 0 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

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

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

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

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ If on downloading this small HTML page iOS finds that it contains the word `Succ

Apple hosts a number of these pages such that should one of these pages go down, a number of fallbacks can be checked to determine whether connectivity is present or whether our connection is blocked by the presence of a captive portal. Unfortunately iOS exposes no framework to developers which allows us to make use of the operating system’s awareness of captive portals.

Connectivity is an open-source framework which wraps Reachability and endeavours to replicate iOS’s means of detecting captive portals. When Reachability detects Wi-Fi or WWAN connectivity, Connectivity contacts a number of endpoints to determine whether true Internet connectivity is present or whether a captive portal is intercepting the connections. This approach can also be used to determine whether an iOS device is connected to a Wi-Fi router with no Internet access.
Connectivity is an open-source framework which wraps Reachability and endeavours to replicate iOS’s means of detecting captive portals. When Reachability detects Wi-Fi or cellular connectivity, Connectivity contacts a number of endpoints to determine whether true Internet connectivity is present or whether a captive portal is intercepting the connections. This approach can also be used to determine whether an iOS device is connected to a Wi-Fi router with no Internet access.

Connectivity provides an interface as close to Reachability as possible so that it is familiar to developers used to working with Reachability. This includes providing the methods `startNotifier()` and `stopNotifier()` to begin checking for changes in Internet connectivity. Once the notifier has been started, you may query for the current connectivity status synchronously using the `status` property (similar to Reachability’s `currentReachabilityStatus`) or asynchronously by registering as an observer with the default NotificationCenter for the notification `kNetworkConnectivityChangedNotification` (in Swift this is accessed through `Notification.Name.ConnectivityDidChange`) — similar to Reachability’s notification `kNetworkReachabilityChangedNotification`.

Expand Down Expand Up @@ -204,8 +204,8 @@ func updateConnectionStatus(_ status: Connectivity.ConnectivityStatus) {
case .connected:
case .connectedViaWiFi:
case .connectedViaWiFiWithoutInternet:
case .connectedViaWWAN:
case .connectedViaWWANWithoutInternet:
case .connectedViaCellular:
case .connectedViaCellularWithoutInternet:
case .notConnected:
}

Expand Down Expand Up @@ -236,9 +236,9 @@ connectivity.checkConnectivity { connectivity in
break
case .connectedViaWiFiWithoutInternet:
break
case .connectedViaWWAN:
case .connectedViaCellular:
break
case .connectedViaWWANWithoutInternet:
case .connectedViaCellularWithoutInternet:
break
case .notConnected:
break
Expand Down

0 comments on commit 8b5d46a

Please sign in to comment.