Skip to content

Commit

Permalink
Merge pull request #86 from appcelerator/v3
Browse files Browse the repository at this point in the history
v3 with major breaking changes
  • Loading branch information
cb1kenobi authored Jul 2, 2019
2 parents 4591361 + 50bd618 commit 90e090b
Show file tree
Hide file tree
Showing 8 changed files with 1,054 additions and 1,186 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
os: osx
osx_image: xcode9
xcode_sdk: iphonesimulator11.0
osx_image: xcode10.2
xcode_sdk: iphonesimulator12.0
node_js:
- "8"
- "10"
- "11"
- '8'
- '10'
- '12'
sudo: false
before_install:
- nvm install 8
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
- export PATH=$HOME/.yarn/bin:$PATH
cache:
yarn: true
Expand Down
65 changes: 38 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,86 @@
# 3.0.0 (Jul 2, 2019)

* BREAKING CHANGE: Dropped support for Node.js versions before v8.12.0.
* BREAKING CHANGE(dep): Upgraded to node-ios-device v2 which dropped support for Node.js 7.x and
older.
* BREAKING CHANGE(simulator): iOS Simulator watch companion lookup map changed to only have
compatible watch simulator UDIDs instead of full descriptor to save on memory.
* fix(simulator): Added check for the existence of the simulator device directory before walking.
* feat(simulator): Added support for Xcode 11.
* chore: Updated dependencies.

# v2.4.0 (Mar 29, 2019)

* chore: Updated dependencies.

# v2.3.1 (Jan 25, 2019)

* Updated dependencies.
* chore: Updated dependencies.

# v2.3.0 (Jan 16, 2019)

* Upgraded to Gulp 4.
* Refactored promises to use async/await.
* Added pluralize dependency since it was removed from snooplogg 2.
* Updated dependencies.
* refactor: Upgraded to Gulp 4.
* refactor: Refactored promises to use async/await.
* fix: Added pluralize dependency since it was removed from snooplogg 2.
* chore: Updated dependencies.

# v2.2.3 (Aug 6, 2018)

* Workaround for sim runtimes that have a bad version number in the runtime's `profile.plist`
[(DAEMON-259)](https://jira.appcelerator.org/browse/DAEMON-259).
* Moved simctl path into executables under xcode info.
* fix: Workaround for sim runtimes that have a bad version number in the runtime's
`profile.plist`. [(DAEMON-259)](https://jira.appcelerator.org/browse/DAEMON-259)
* refactor: Moved simctl path into executables under xcode info.

# v2.2.2 (Aug 6, 2018)

* Added path to global Xcode license file.
* Updated npm dependencies.
* fix: Added path to global Xcode license file.
* chore: Updated dependencies.

# v2.2.1 (Jun 11, 2018)

* Added the `ioslib detect-device-pairs` command.
* Updated the device pair compatibility table.
* Updated npm dependencies.
* feat: Added the `ioslib detect-device-pairs` command.
* chore: Updated the device pair compatibility table.
* chore: Updated dependencies.

# v2.2.0 (Jun 5, 2018)

* Added Xcode 10 to device pair lookup
[(TIMOB-26089)](https://jira.appcelerator.org/browse/TIMOB-26089).
* chore: Added Xcode 10 to device pair lookup.
[(TIMOB-26089)](https://jira.appcelerator.org/browse/TIMOB-26089)

# v2.1.0 (May 30, 2018)

* Updated npm dependencies.
- Update node-ios-device to 1.6.1 which includes Node 10 support.
* Updated `ioslib` bin to use `cli-kit`'s help, version, and aliases.
* chore: Updated `ioslib` bin to use `cli-kit`'s help, version, and aliases.
* chore: Updated dependencies.

# v2.0.7 (Apr 9, 2018)

* Updated npm dependencies.
* chore: Updated dependencies.

# v2.0.6 (Dec 14, 2017)

* Fixed bug where extract teams from provisioning profiles would fail if any provisioning profiles
didn't have any associated teams [(DAEMON-209)](https://jira.appcelerator.org/browse/DAEMON-209).
* fix: Fixed bug where extract teams from provisioning profiles would fail if any provisioning
profiles didn't have any associated teams.
[(DAEMON-209)](https://jira.appcelerator.org/browse/DAEMON-209)

# v2.0.5 (Dec 12, 2017)

* Updated to node-ios-device@1.5.0 which added support for Node.js 9.
* chore: Updated dependencies.

# v2.0.4 (Dec 11, 2017)

* Fixed bug where a failure to parse a cert name would cause no certs to be found and an error to
be thrown.
* fix: Fixed bug where a failure to parse a cert name would cause no certs to be found and an
error to be thrown.

# v2.0.3 (Dec 6, 2017)

* Updated npm dependencies to GA release of `appcd-*` packages.
* chore: Updated dependencies.

# v2.0.2 (Nov 22, 2017)

* Updated npm dependencies.
* chore: Updated dependencies.

# v2.0.1 (Nov 17, 2017)

* Removed hard coded path that was used for debugging.
* chore: Removed hard coded path that was used for debugging.

# v2.0.0 (Nov 17, 2017)

Expand Down
29 changes: 13 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ioslib",
"version": "2.4.0",
"version": "3.0.0",
"publishConfig": {
"tag": "next"
},
Expand All @@ -27,28 +27,25 @@
"test": "gulp test"
},
"dependencies": {
"appcd-fs": "^1.1.6",
"appcd-path": "^1.1.5",
"appcd-subprocess": "^1.3.0",
"appcd-util": "^1.1.6",
"cli-kit": "^0.7.5",
"node-forge": "^0.8.2",
"node-ios-device": "^1.6.3",
"appcd-fs": "^1.1.7",
"appcd-path": "^1.1.6",
"appcd-subprocess": "^2.0.1",
"appcd-util": "^1.1.7",
"cli-kit": "^0.11.1",
"node-forge": "^0.8.5",
"node-ios-device": "^2.0.0",
"promise-limit": "^2.7.0",
"semver": "^6.0.0",
"semver": "^6.2.0",
"simple-plist": "^1.0.0",
"source-map-support": "^0.5.11"
"source-map-support": "^0.5.12"
},
"devDependencies": {
"appcd-gulp": "^2.1.0"
"appcd-gulp": "^2.1.1"
},
"homepage": "https://github.com/appcelerator/ioslib",
"bugs": "https://github.com/appcelerator/ioslib/issues",
"repository": {
"type": "git",
"url": "git://github.com/appcelerator/ioslib.git"
},
"repository": "https://github.com/appcelerator/ioslib",
"engines": {
"node": ">=8.0.0"
"node": ">=8.12.0"
}
}
39 changes: 8 additions & 31 deletions src/devices.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import iosDevice from 'node-ios-device';

import { EventEmitter } from 'events';
import { tailgate } from 'appcd-util';

/**
* Device information.
*/
Expand All @@ -18,42 +15,22 @@ export class Device {
}
}

/**
* Exposes an event emitter for device changes and a method to stop tracking.
*/
export class TrackDeviceHandle extends EventEmitter {
/**
* Wraps the ios-device handle.
*
* @param {Handle} handle - An ios-device track handle.
* @access public
*/
constructor(handle) {
super();
this.stop = () => handle.stop();
handle.on('devices', devices => this.emit('devices', devices.map(d => new Device(d))));
handle.on('error', err => this.emit('error', err));
}
}

/**
* Detects all attached devices.
*
* @returns {Promise<Array.<Object>>}
* @returns {Array.<Object>}
*/
export function getDevices() {
return tailgate('ioslib:devices', () => new Promise((resolve, reject) => {
iosDevice.devices((err, devices) => {
return err ? reject(err) : resolve(devices.map(d => new Device(d)));
});
}));
export function list() {
return iosDevice.list().map(d => new Device(d));
}

/**
* Starts listening for devices being connected or disconnected.
*
* @returns {TrackDeviceHandle}
* @returns {WatchDeviceHandle}
*/
export function trackDevices() {
return new TrackDeviceHandle(iosDevice.trackDevices());
export function watch() {
const handle = iosDevice.watch();
handle.on('change', devices => handle.emit('devices', devices.map(d => new Device(d))));
return handle;
}
8 changes: 8 additions & 0 deletions src/provisioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,18 @@ export function parseProvisioningProfileFile(file) {
}

let data;
const write = console._stderr && console._stderr.write;
if (write) {
console._stderr.write = () => {};
}
try {
data = plist.parse(contents.substring(i, j + 8), path.basename(file));
} catch (e) {
return reject(new Error(`Unable to parse provisioning profile: ${e.message}`));
} finally {
if (write) {
console._stderr.write = write;
}
}

const entitlements = data.Entitlements || {};
Expand Down
Loading

0 comments on commit 90e090b

Please # to comment.