Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idevice-browser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idevice-browser

NPM for easily discovering iOS-devices (iOS6, iOS7 and iOS8) connected to your local network.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

NodeJS iDevice browser

SUMMARY

NPM for easily discovering iOS-devices (iOS6 and iOS7) connected to your local network. Emits an event every time it discovers a device. But also keeps track of which devices that been connected so you can getDevice(dateSinceLastSeen).

INSTALLING

Before installing on Debian systems. You need to apt-get install libavahi-compat-libdnssd-dev.

npm install idevice-browser

Or put this in your package.json

"dependencies": {
    "idevice-browser": "*"
}

USAGE

You can use the module in two ways or a combination of the two. Either you can build your own implementation of which devices who is online at the moment by listening to the event emitted ideviceonline and ideviceoffline. Or you could get the online devices since a spesific date by idevice.getDevices(dateSinceLastSeen).

Example one

var idevice = require('idevice-browser');

idevice.start();

setInterval(function() { 
    var lastSeen = new Date();
        lastSeen.setTime(lastSeen.getTime() - 3600000);

    console.log(idevice.getDevices(lastSeen));
}, 5000);

Example two

var idevice        = require('idevice-browser')
  , devices        = {}
  , deletedDevices = {};

idevice.on('ideviceonline', function(device) {
    devices[device.name] = device;
    console.log('Found an iDevice on your network: ' + device.name, device);
});

idevice.on('ideviceoffline', function(device) {
    deletedDevices[device.name] = device;
    delete devices[device.name];
    console.log('Remove device', device.name);
});

idevice.start();

LICENSE

MIT, see the LICENSE file

Keywords

FAQs

Package last updated on 12 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc