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
ConnectivityStatusenum Objective-C compatible.
- Made
ConnectivityFrameworkenum 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
validationModeon the Connectivity object may now take a value of.customallowing an implementation ofConnectivityResponseValidatorprotocol to be supplied to theresponseValidatorproperty. This custom validator will be used to validate the response returned when accessing the connectivity URLs.
- Updated podspec to include
Network.frameworkas part of theweak_frameworksentry rather than as part offrameworks.
- Fixed missing framework dependencies in podspec, see Issue #24.
- Properties
availableInterfacesandcurrentInterfaceindicate the network interfaces used in the most recent connectivity check. - New
Connectivity.Statuscase.determiningwill be returned prior to a connectivity check having completed.
- Refactor of
statusproperty which is now set on most recent connectivity check rather than computed on read.
- Ensure reading from and writing to the
pathproperty occurs in a thread-safe manner.
- Removed superfluous
canImportaround properties usingNetworkframework.
- Support for Swift Package Manager where using Xcode 11.0 beta.
- Makes Connectivity a
NSObjectsubclass for compatibility with Objective-C.
- Now targets Swift 5.0 instead of Swift 4.2.
- Made the
Connectivity.Percentageinitializerpublic.
- Added the ability to specify a bearer token for authorization by setting the
bearerTokenproperty.
- Added the ability to determine the method used to validate the response returned by a connectivity endpoint.
- Added support for tvOS.
- Makes
pollingIntervalpublicly 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 onlyin target deployment info.
- Provided the ability to switch between Reachability and the Network framework (from iOS 12 onwards) using the new
frameworkproperty on theConnectivityobject.
- Makes a
checkConnectivitycall required to reliably query connectivity state for one-off checks (see the example app). - Properties referring to
WWANhave been renamed toCellulare.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
ConnectivityDidChangenotification 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.