# idevice-browser

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

Latest version **1.1.0** (published 2015-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install idevice-browser
pnpm add idevice-browser
yarn add idevice-browser
bun add idevice-browser
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-08-12 |
| First published | 2014-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ole-Kenneth Bratholt |
| Maintainers | olekenneth |
| Keywords | ios, idevice, iphone, ipad, ipod, ios6, ios7, browser, bonjour, mdns, multicast-dns |

## Links

- npm: https://www.npmjs.com/package/idevice-browser
- Repository: https://github.com/olekenneth/node-idevice-browser
- Issues: https://github.com/olekenneth/node-idevice-browser/issues
- npm.io page: https://npm.io/package/idevice-browser

## Dependencies (1)

- [mdns](https://npm.io/package/mdns.md) git+https://github.com/agnat/node_mdns.git

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-08-12
- 1.0.3 — 2014-02-27
- 1.0.2 — 2014-02-27
- 1.0.1 — 2014-02-27
- 1.0.0 — 2014-02-27

## README

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

---
_Source: https://npm.io/package/idevice-browser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
