Latest | 0.3.0 |
---|---|
Homepage | https://github.com/neobeppe/GTNetInfo |
License | MIT |
Platforms | ios 7.0, requires ARC |
Dependencies | Reachability |
Frameworks | CoreTelephony, SystemConfiguration |
Authors |
Info
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.
Installation
GTNetInfo is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "GTNetInfo"
In alternative, just download the project and import .h,.m files. Remember that GTNetInfo has Tony Million’s Reachability dependency and needs CoreTelephony.framework and SystemConfiguration.framework
Usage
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 <GTNetInfo.h>
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];
Requirements
NB: This Alpha does not work on simulator.
Author
Giuseppe Travasoni, [email protected]
License
GTNetInfo is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "GTNetInfo", "version": "0.3.0", "summary": "GTNetInfo provides a fast way to check your connection type.", "description": "Use GTNetInfo to know if you're connected, what's the SSID of WiFi network or the type of cellular connection.", "homepage": "https://github.com/neobeppe/GTNetInfo", "license": "MIT", "authors": { "Giuseppe Travasoni": "[email protected]" }, "source": { "git": "https://github.com/neobeppe/GTNetInfo.git", "tag": "0.3.0" }, "social_media_url": "https://twitter.com/neobeppe", "platforms": { "ios": "7.0" }, "requires_arc": true, "source_files": "Pod/Classes/**/*", "resource_bundles": { "GTNetInfo": [ "Pod/Assets/*.png" ] }, "frameworks": [ "CoreTelephony", "SystemConfiguration" ], "dependencies": { "Reachability": [] } }
Sat, 27 Feb 2016 14:06:02 +0000