All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added iOS 13 URL to default connectivity URLs.
- Made
ConnectivityStatus
enum Objective-C compatible.
- Made
ConnectivityFramework
enum Objective-C compatible.
-
Added new validators including:
ConnectivityResponseStringEqualityValidator
: Determines whether the response string is equal to an expected string.ConnectivityResponseContainsStringValidator
: Determines whether the response string contains an expected string.ConnectivityResponseRegExValidator
: Determines whether the response string matches a given regular expression.
These validators can be composed when creating a custom validator conforming to ConnectivityResponseValidator
protocol.
- Property
validationMode
on the Connectivity object may now take a value of.custom
allowing an implementation ofConnectivityResponseValidator
protocol to be supplied to theresponseValidator
property. This custom validator will be used to validate the response returned when accessing the connectivity URLs.
- Updated podspec to include
Network.framework
as part of theweak_frameworks
entry rather than as part offrameworks
.
- Fixed missing framework dependencies in podspec, see Issue #24.
- Properties
availableInterfaces
andcurrentInterface
indicate the network interfaces used in the most recent connectivity check. - New
Connectivity.Status
case.determining
will be returned prior to a connectivity check having completed.
- Refactor of
status
property which is now set on most recent connectivity check rather than computed on read.
- Ensure reading from and writing to the
path
property occurs in a thread-safe manner.
- Removed superfluous
canImport
around properties usingNetwork
framework.
- Support for Swift Package Manager where using Xcode 11.0 beta.
- Makes Connectivity a
NSObject
subclass for compatibility with Objective-C.
- Now targets Swift 5.0 instead of Swift 4.2.
- Made the
Connectivity.Percentage
initializerpublic
.
- Added the ability to specify a bearer token for authorization by setting the
bearerToken
property.
- Added the ability to determine the method used to validate the response returned by a connectivity endpoint.
- Added support for tvOS.
- Makes
pollingInterval
publicly accessible.
- Use
Timer.scheduledTimer(timeInterval:target:selector:userInfo:repeats:)
rather thanTimer.scheduledTimer(withTimeInterval:repeats:block:)
making polling available prior to iOS 10.
- Enabled
Allow app extension API only
in target deployment info.
- Provided the ability to switch between Reachability and the Network framework (from iOS 12 onwards) using the new
framework
property on theConnectivity
object.
- Makes a
checkConnectivity
call required to reliably query connectivity state for one-off checks (see the example app). - Properties referring to
WWAN
have been renamed toCellular
e.g.isConnectedViaWWAN
->isConnectedViaCellular
.
- Refactored code into smaller reusable functions to eliminate code duplication and improve maintainability.
- Allows the polling interval to be configured.
- Exposes the
ConnectivityDidChange
notification name as part of the public interface.
- Enforces SSL by default.
- Updated for Xcode 10 and Swift 4.2.
- Fixed an issue whereby the callback could be invoked more frequently than necessary if using the polling option.
- Adds a sample application to demonstrate how to use Connectivity.
- Improvements to code structure and an early exit mechanism such that once the required number of successful connectivity checks has been met any pending checks will be cancelled as they will no longer affect the result.
-
This release introduces support for Swift 4 and integration using the Carthage dependency manager. In order to integrate Connectivity into your project via Carthage, add the following line to your project's Cartfile:
github "rwbutler/Connectivity"
- Connectivity is a framework which improves on Reachability by allowing developers to detect whether true Internet connectivity is available or whether a captive portal is blocking Internet traffic.