TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2015 |
Maintained by Giuseppe Travasoni.
This is a very first alpha release of NetInfo. This library give you an istant access to connectivity status of your device as a snapshot.
To run the example project, clone the repo, and run pod install
from the Example directory first.
To use NetInfo just import it anywhere you need to use it: #import
Create a GtNetInfo object:
GTNetInfo *netInfo = [[GTNetInfo alloc] init];
Inside this object you'll find 4 properties, 2 boolean and 2 strings.
//Is device currently connected?
BOOL connected = [netInfo isConnected];
//Is device currently connected to a Wi-Fi network?
BOOL connectedWifi = [netInfo isWifi];
//If device is currently connected to a Wi-Fi network, what's the SSID?
NSString* SSID = [netInfo currentSSID];
//If device is currently connected, which radio technology is using?
NSString* radioTecnology = [netInfo currentRadioTecnology];
NB: This Alpha does not work on simulator.
GTNetInfo is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "GTNetInfo"
Giuseppe Travasoni, [email protected]
GTNetInfo is available under the MIT license. See the LICENSE file for more info.