❌📱 A little swift Internet error status indicator using ReachabilitySwift

Overview

EFInternetIndicator

CI Status Version License Platform

Requirements

  • Xcode 8.0+
  • iOS 8.3+

WARNING : It's not work on simulator. #1

Installation

CocoaPods

You can use CocoaPods to install EFInternetIndicator by adding it to your Podfile:

use_frameworks!
pod 'EFInternetIndicator'

Example

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

Usage example

To start monitoring internet status in a single UIViewController you just need add the InternetStatusIndicable protocol and start monitoring with startMonitoringInternet()

import UIKit
import EFInternetIndicator

class ViewController: UIViewController, InternetStatusIndicable {
    
    var internetConnectionIndicator:InternetViewIndicator?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.startMonitoringInternet()
    }
}

Also, you can customize indicator using custom parameters:

func startMonitoringInternet(backgroundColor:UIColor, style: MessageView.Layout, textColor:UIColor, message:String, remoteHostName: String)

If you want all yours UIViewControllers monitoring internet you can create a abstract class like:

import UIKit
import EFInternetIndicator

class EFViewController: UIViewController, InternetStatusIndicable {
    
    var internetConnectionIndicator:InternetViewIndicator?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.startMonitoringInternet()
    }
}

class SecondViewController: EFViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }   
}

// Override properties when you want 
class MagicViewController: EFViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.startMonitoringInternet(backgroundColor:UIColor.blue, style: .StatusLine, textColor:UIColor.white, message:"No magic on internet here :(", remoteHostName: "magic.com")
    }   
}

Author

ezefranca, [email protected]

Acknowledgments

License

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

You might also like...
Quickstart-ios-swift-grpc - Quickstart for integrating Approov with iOS apps in Swift that make API requests you wish to protect using GRPC
Swift HTTP server using the pre-fork worker model

Curassow Curassow is a Swift Nest HTTP Server. It uses the pre-fork worker model and it's similar to Python's Gunicorn and Ruby's Unicorn. It exposes

WebSocket(RFC-6455) library written using Swift

DNWebSocket Object-Oriented, Swift-style WebSocket Library (RFC 6455) for Swift-compatible Platforms. Tests Installation Requirements Usage Tests Conf

An awesome Swift HTML DSL library using result builders.

SwiftHtml An awesome Swift HTML DSL library using result builders. let doc = Document(.html5) { Html { Head { Meta()

Generic Network Layer created using Swift.

Generic-Network-Layer_iOS Generic Network Layer created using URLSession. Networking is an essential element in app development, and you'll need API c

Plugin and runtime library for using protobuf with Swift

Swift Protobuf Welcome to Swift Protobuf! Apple's Swift programming language is a perfect complement to Google's Protocol Buffer ("protobuf") serializ

AsyncHTTP - Generic networking library written using Swift async/await

Generic networking library written using Swift async/await

A web API client in Swift built using Async/Await

Get A modern web API client in Swift built using Async/Await and Actors. let cli

Approov-service-ios-swift-grpc - Approov service layer for iOS clients using GRPC

Approov Service for GRPC A wrapper for the Approov SDK to enable easy integratio

Comments
  • Statusbar rawvalue not found

    Statusbar rawvalue not found

    Screenshot 2022-10-20 at 12 52 15 AM I am getting this issue "Cannot convert value of type 'CGFloat' to expected argument type 'UIWindow.Level' Replace 'UIWindow.Level.statusBar.rawValue' with 'UIWindow.Level(rawValue: UIWindow.Level.statusBar.rawValue) ?? <#default value#>' "
    opened by keyur158 0
  • Abort trap: 6 (in target 'EFInternetIndicator' from project 'Pods')

    Abort trap: 6 (in target 'EFInternetIndicator' from project 'Pods')

    When i am using this library with OS 10 then it is working fine but when i update OS to 15 then i am getting this error when running app in simulator.

    i have disabled bitcoin from pod.

    Anyone have answer related to this issue?

    Thanks in advance..!!

    opened by pokharna-simran 0
  • when I used custom parameters it keeps showing no internet connection

    when I used custom parameters it keeps showing no internet connection

    when I used custom parameters it keeps showing no internet connection even if the device is connected, on the other hand the default one without any custom parameters works as expected

    opened by merovic 2
Releases(0.0.6)
Owner
Ezequiel França
Software Development, Games, Mechatronics, Education, and Basil Pesto.
Ezequiel França
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

StatusBarOverlay StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It support

Idle Hands Apps 160 Nov 2, 2022
A simple class to check for internet connection availability in Swift.

Reach A simple class to check for internet connection availability in Swift. Works for both 3G and WiFi connections. Install Manually Add the Reach.sw

Isuru Nanayakkara 459 Dec 29, 2022
Private Internet Access - PIA VPN for iOS

Private Internet Access Private Internet Access is the world's leading consumer VPN service. At Private Internet Access we believe in unfettered acces

Private Internet Access - Free and Open Source Software 202 Dec 23, 2022
Commonly available global error type packages

ErrorKit 일반적으로 사용 할 수 있는 전역 오류 타입 패키지. Requirements Xcode 13.2.1+ Swift 5.5+ Ins

Jaemyeong Jin 0 Nov 6, 2022
A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic.

A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic.

Proxyman 867 Dec 29, 2022
Little project I wrote a while ago I decided to clean up and upload.

ImageSearch About The project uses the Pixabay (https://pixabay.com/) API to show images relating to entered text. The app is built using an MVVM arch

Jay Bennett 0 Dec 7, 2021
Automatically sets the network activity indicator for any performed request.

BigBrother BIG BROTHER IS WATCHING YOU. BigBrother is a Swift library made for iOS that automatically watches for any performed request and sets the n

Marcelo Fabri 446 Dec 17, 2022
Indicates VPN state in status bar

VPNIndicator Indicates VPN state in status bar. Turn WiFi or cell signal icon to blue when VPN is active, intended for X-series iphones. Compatibility

udevs 5 Aug 24, 2022
Simple iOS app in Swift to show AQI for some cities using websocket using Combine + MVVM

AQI Simple iOS app in Swift to show AQI for some cities using websocket using Combine + MVVM This app follows MVVM This app uses combine framework The

Amey Vikkram Tiwari 2 Nov 6, 2022
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-5.1

Kitura 1.3k Dec 26, 2022