Skip to content

A Swift Library To Track Network Reachability Changes. A Replacement For Apple's Reachability Class

Notifications You must be signed in to change notification settings

931743010/SSASwiftReachability

 
 

Repository files navigation

SSASideMenu

###Usage

    override func viewDidLoad() {
        super.viewDidLoad()
        
         // MARK: Start Monitoring For Network Reachability Changes.
        SSASwiftReachability.sharedManager?.startMonitoring()
        
        // MARK: Listen For Network Reachability Changes
        NSNotificationCenter.defaultCenter().addObserver(self, selector: "reachabilityStatusChanged:", name: reachabilityDidChangeNotification, object: nil)
    }
    
    func reachabilityStatusChanged(notification: NSNotification) {
        guard let userInfo = notification.userInfo else { return }
        guard let statusItem = userInfo[SSAReachabilityNotificationStatusItem] as? String else { return }

        print(statusItem)

    }
    

###Installation As for now please clone the repository and drag the source folder into your project to use SSASwiftReachability. (Cocoapods & Carthage support coming soon)

###Author

Sebastian Andersen

Inspired by AFNetworkReachabilityManager

###License

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

About

A Swift Library To Track Network Reachability Changes. A Replacement For Apple's Reachability Class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%