Latest 0.2.1
Homepage https://github.com/uxmstudio/LANScanner
License MIT
Platforms ios 9.0, requires ARC
Authors

Version
License
Platform

Easily scan a Wi-Fi network for devices

Installation

CocoaPods

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

pod "LANScanner"

Usage

Start a scan

let scanner = LANScanner(delegate: self, continuous: false)
scanner?.startScan()

Be sure to implement the delegate LANScannerDelegate

Get IP address of local device

var netInfo = LANScanner.getLocalAddress()
print(netInfo.ip)
print(netInfo.netmask)

Interface


/// Public
var delegate:LANScannerDelegate // Delegate for discovery callbacks
var continuous:Bool // When set this will restart the scan when completed

func startScan() // Begin a scan
func stopScan() // End a scan

static func getHostName(ipaddress: String) -> String? // Get the hostname from an IP address
static func getLocalAddress() -> NetInfo? // Get the local devices IP address and 

/// Delegate
func LANScannerDiscovery(device: LANDevice)
func LANScannerFinished()    
func LANScannerRestarted()
func LANScannerFailed(error: NSError)  

Author

Chris Anderson:

License

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

Latest podspec

{
    "name": "LANScanner",
    "version": "0.2.1",
    "summary": "Scan a Wi-Fi network for devices.",
    "description": "Easily scan through a Wi-Fi network to find devices, their IP address and hostname.",
    "homepage": "https://github.com/uxmstudio/LANScanner",
    "license": "MIT",
    "authors": {
        "Chris Anderson": "[email protected]"
    },
    "source": {
        "git": "https://github.com/uxmstudio/LANScanner.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": [
        "Pod/Classes/**/*",
        "Pod/Module/**/*.{h,m}"
    ],
    "module_map": "Pod/Module/LANScanner.modulemap",
    "public_header_files": [
        "Pod/Classes/**/*.h",
        "Pod/Module/**/*.h"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This