How to use the node-ios-device.trackDevices 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
return emitter;
	}

	var appName = options.appName || path.basename(appPath).replace(/\.app$/, ''),
		installedRegExp = new RegExp(' installd\\[.* Installing .*' + appId),
		logRegExp = new RegExp(' ' + appName + '\\[(\\d+)\\][^:]+: (.*)'),
		quitRegExp = new RegExp(' backboardd\\[[^:]+: Application .+\\:' + appId + '\\['),
		lastLineWasOurs = false,
		PUMPING_LOG = 1,
		INSTALLING = 2,
		INSTALLED = 3,
		RUNNING = 4,
		state = PUMPING_LOG,
		timer = null,
		logOff,
		trackOff = iosDevice.trackDevices(function (err, devices) {
			if (!devices.some(function (device) { return device.udid === udid; })) {
				trackOff();
				logOff && logOff();
				if (state === RUNNING) {
					emitter.emit('app-quit');
				}
				emitter.emit('disconnect');
			}
		});

	process.nextTick(function () {
		try {
			logOff = iosDevice.log(udid, function (msg) {
				if (state == PUMPING_LOG) {
					// we create a timer here so that if we haven't received any messages for a
					// half second, then the log must be caught up and we're ready to install
github appcelerator / ioslib / src / devices.js View on Github external
export function trackDevices() {
	return new TrackDeviceHandle(iosDevice.trackDevices());
}

node-ios-device

Simple library for listing and installing apps on iOS devices

Apache-2.0
Latest version published 17 days ago

Package Health Score

70 / 100
Full package analysis