ReachabilityLib 1.0.3

ReachabilityLib 1.0.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Kuray OGUN.



 
Depends on:
NotificationBannerSwift>= 0
MaterialColor>= 0
 

ReachabilityLib

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 9.0+
  • Xcode 8.1, 8.2, 8.3
  • Swift 3.0, 3.1, 3.2

Installation

ReachabilityLib is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ReachabilityLib"

Usage

import ReachabilityLib
if !reachability.isInternetAvailable(){
print("No internet connection")
// Notification Banner comes from top and alert the user (Optional)
reachability.showNetworkAlert(title: "Internet Connection is not available", subtitle: "Please check your internet connection and try again.", autoDismiss: false)
} else {
print("Yay! Internet Connection")
// Notification Banner comes from top and alert the user (Optional)
reachability.showBanner(title: "Perfect Network Connection!", subtitle: "Yay! We have a nice & smooth network connection", style: .success, autoDismiss: true)
}

Future Enhancements

  • [x] Complete a working Example
  • [ ] Add Carthage installation option
  • [ ] Add Swift Package Manager installation option
  • [ ] XCode 9 compatibility and tests
  • [ ] Swift 4 compatibility and tests
  • [ ] Add Quick Testing

Author

FreakyCoder, [email protected]

License

ReachabilityLib is available under the MIT license. See the LICENSE file for more info.