How to use the node-ios-device.devices function in node-ios-device

To help you get started, we’ve selected a few node-ios-device examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appcelerator / titanium_mobile / node_modules / ioslib / lib / device.js View on Github external
var err = new Error(__('Unsupported platform "%s"', process.platform));
			emitter.emit('error', err);
			callback(err);
		});
		return emitter;
	}

	if (cache && !options.bypassCache) {
		process.nextTick(function () {
			emitter.emit('detected', cache);
			callback(null, cache);
		});
		return emitter;
	}

	iosDevice.devices(function (err, devices) {
		process.nextTick(function () {
			if (err) {
				emitter.emit('error', err);
				return callback(err);
			}

			cache = {
				devices: JSON.parse(JSON.stringify(devices)),
				issues: []
			};

			emitter.emit('detected', cache);
			callback(null, cache);
		});
	});
github appcelerator / titanium_mobile / iphone / cli / lib / detect.js View on Github external
exports.detectDevices = function detectDevices(finished) {
	iosDevice.devices(function (err, devices) {
		if (err) {
			finished(err);
		} else {
			devices.unshift({
				udid: 'itunes',
				name: __('iTunes Sync')
			});
			finished(null, devices.map(function (d) {
				d.id = d.udid;
				return d;
			}));
		}
	});
};
github jeffbonnes / ti-adp / hooks / hook.js View on Github external
function checkAttachedDevices(info) {
	if (process.argv.indexOf('--auto-device') !== -1) {
		logger.info('Getting details of attached devices.');
		iosDevice.devices(function(err, devices) {
			logger.info("Found " + devices.length + " connected devices");
			if (devices.length == 1) {
				selectedDevice = devices[0];
				logger.info('Attached device name: ' + selectedDevice.name);
				device.name = selectedDevice.name;
				device.UDID = selectedDevice.udid;
				getPPDetails(info);
			} else if (devices.length > 1) {
				//prompt user to select the device
				promptToSelectDevice(devices, function(selected) {
					selectedDevice = JSON.parse(selected);
					logger.info('Selected device name' + selectedDevice.name);
					device.name = selectedDevice.name;
					device.UDID = selectedDevice.udid;
					addCliArg(cli, 'C', selectedDevice.udid);
					getPPDetails(info);
github appcelerator / ioslib / src / devices.js View on Github external
return tailgate('ioslib:devices', () => new Promise((resolve, reject) => {
		iosDevice.devices((err, devices) => {
			return err ? reject(err) : resolve(devices.map(d => new Device(d)));
		});
	}));
}

node-ios-device

Simple library for listing and installing apps on iOS devices

Apache-2.0
Latest version published 5 months ago

Package Health Score

62 / 100
Full package analysis