Skip to content

Commit 90e090b

Browse files
authored
Merge pull request #86 from appcelerator/v3
v3 with major breaking changes
2 parents 4591361 + 50bd618 commit 90e090b

File tree

8 files changed

+1054
-1186
lines changed

8 files changed

+1054
-1186
lines changed

.travis.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
os: osx
2-
osx_image: xcode9
3-
xcode_sdk: iphonesimulator11.0
2+
osx_image: xcode10.2
3+
xcode_sdk: iphonesimulator12.0
44
node_js:
5-
- "8"
6-
- "10"
7-
- "11"
5+
- '8'
6+
- '10'
7+
- '12'
88
sudo: false
99
before_install:
1010
- nvm install 8
11-
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
11+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
1212
- export PATH=$HOME/.yarn/bin:$PATH
1313
cache:
1414
yarn: true

CHANGELOG.md

+38-27
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,86 @@
1+
# 3.0.0 (Jul 2, 2019)
2+
3+
* BREAKING CHANGE: Dropped support for Node.js versions before v8.12.0.
4+
* BREAKING CHANGE(dep): Upgraded to node-ios-device v2 which dropped support for Node.js 7.x and
5+
older.
6+
* BREAKING CHANGE(simulator): iOS Simulator watch companion lookup map changed to only have
7+
compatible watch simulator UDIDs instead of full descriptor to save on memory.
8+
* fix(simulator): Added check for the existence of the simulator device directory before walking.
9+
* feat(simulator): Added support for Xcode 11.
10+
* chore: Updated dependencies.
11+
112
# v2.4.0 (Mar 29, 2019)
213

314
* chore: Updated dependencies.
415

516
# v2.3.1 (Jan 25, 2019)
617

7-
* Updated dependencies.
18+
* chore: Updated dependencies.
819

920
# v2.3.0 (Jan 16, 2019)
1021

11-
* Upgraded to Gulp 4.
12-
* Refactored promises to use async/await.
13-
* Added pluralize dependency since it was removed from snooplogg 2.
14-
* Updated dependencies.
22+
* refactor: Upgraded to Gulp 4.
23+
* refactor: Refactored promises to use async/await.
24+
* fix: Added pluralize dependency since it was removed from snooplogg 2.
25+
* chore: Updated dependencies.
1526

1627
# v2.2.3 (Aug 6, 2018)
1728

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

2233
# v2.2.2 (Aug 6, 2018)
2334

24-
* Added path to global Xcode license file.
25-
* Updated npm dependencies.
35+
* fix: Added path to global Xcode license file.
36+
* chore: Updated dependencies.
2637

2738
# v2.2.1 (Jun 11, 2018)
2839

29-
* Added the `ioslib detect-device-pairs` command.
30-
* Updated the device pair compatibility table.
31-
* Updated npm dependencies.
40+
* feat: Added the `ioslib detect-device-pairs` command.
41+
* chore: Updated the device pair compatibility table.
42+
* chore: Updated dependencies.
3243

3344
# v2.2.0 (Jun 5, 2018)
3445

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

3849
# v2.1.0 (May 30, 2018)
3950

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

4454
# v2.0.7 (Apr 9, 2018)
4555

46-
* Updated npm dependencies.
56+
* chore: Updated dependencies.
4757

4858
# v2.0.6 (Dec 14, 2017)
4959

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

5364
# v2.0.5 (Dec 12, 2017)
5465

55-
* Updated to [email protected] which added support for Node.js 9.
66+
* chore: Updated dependencies.
5667

5768
# v2.0.4 (Dec 11, 2017)
5869

59-
* Fixed bug where a failure to parse a cert name would cause no certs to be found and an error to
60-
be thrown.
70+
* fix: Fixed bug where a failure to parse a cert name would cause no certs to be found and an
71+
error to be thrown.
6172

6273
# v2.0.3 (Dec 6, 2017)
6374

64-
* Updated npm dependencies to GA release of `appcd-*` packages.
75+
* chore: Updated dependencies.
6576

6677
# v2.0.2 (Nov 22, 2017)
6778

68-
* Updated npm dependencies.
79+
* chore: Updated dependencies.
6980

7081
# v2.0.1 (Nov 17, 2017)
7182

72-
* Removed hard coded path that was used for debugging.
83+
* chore: Removed hard coded path that was used for debugging.
7384

7485
# v2.0.0 (Nov 17, 2017)
7586

package.json

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ioslib",
3-
"version": "2.4.0",
3+
"version": "3.0.0",
44
"publishConfig": {
55
"tag": "next"
66
},
@@ -27,28 +27,25 @@
2727
"test": "gulp test"
2828
},
2929
"dependencies": {
30-
"appcd-fs": "^1.1.6",
31-
"appcd-path": "^1.1.5",
32-
"appcd-subprocess": "^1.3.0",
33-
"appcd-util": "^1.1.6",
34-
"cli-kit": "^0.7.5",
35-
"node-forge": "^0.8.2",
36-
"node-ios-device": "^1.6.3",
30+
"appcd-fs": "^1.1.7",
31+
"appcd-path": "^1.1.6",
32+
"appcd-subprocess": "^2.0.1",
33+
"appcd-util": "^1.1.7",
34+
"cli-kit": "^0.11.1",
35+
"node-forge": "^0.8.5",
36+
"node-ios-device": "^2.0.0",
3737
"promise-limit": "^2.7.0",
38-
"semver": "^6.0.0",
38+
"semver": "^6.2.0",
3939
"simple-plist": "^1.0.0",
40-
"source-map-support": "^0.5.11"
40+
"source-map-support": "^0.5.12"
4141
},
4242
"devDependencies": {
43-
"appcd-gulp": "^2.1.0"
43+
"appcd-gulp": "^2.1.1"
4444
},
4545
"homepage": "https://github.com/appcelerator/ioslib",
4646
"bugs": "https://github.com/appcelerator/ioslib/issues",
47-
"repository": {
48-
"type": "git",
49-
"url": "git://github.com/appcelerator/ioslib.git"
50-
},
47+
"repository": "https://github.com/appcelerator/ioslib",
5148
"engines": {
52-
"node": ">=8.0.0"
49+
"node": ">=8.12.0"
5350
}
5451
}

src/devices.js

+8-31
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import iosDevice from 'node-ios-device';
22

3-
import { EventEmitter } from 'events';
4-
import { tailgate } from 'appcd-util';
5-
63
/**
74
* Device information.
85
*/
@@ -18,42 +15,22 @@ export class Device {
1815
}
1916
}
2017

21-
/**
22-
* Exposes an event emitter for device changes and a method to stop tracking.
23-
*/
24-
export class TrackDeviceHandle extends EventEmitter {
25-
/**
26-
* Wraps the ios-device handle.
27-
*
28-
* @param {Handle} handle - An ios-device track handle.
29-
* @access public
30-
*/
31-
constructor(handle) {
32-
super();
33-
this.stop = () => handle.stop();
34-
handle.on('devices', devices => this.emit('devices', devices.map(d => new Device(d))));
35-
handle.on('error', err => this.emit('error', err));
36-
}
37-
}
38-
3918
/**
4019
* Detects all attached devices.
4120
*
42-
* @returns {Promise<Array.<Object>>}
21+
* @returns {Array.<Object>}
4322
*/
44-
export function getDevices() {
45-
return tailgate('ioslib:devices', () => new Promise((resolve, reject) => {
46-
iosDevice.devices((err, devices) => {
47-
return err ? reject(err) : resolve(devices.map(d => new Device(d)));
48-
});
49-
}));
23+
export function list() {
24+
return iosDevice.list().map(d => new Device(d));
5025
}
5126

5227
/**
5328
* Starts listening for devices being connected or disconnected.
5429
*
55-
* @returns {TrackDeviceHandle}
30+
* @returns {WatchDeviceHandle}
5631
*/
57-
export function trackDevices() {
58-
return new TrackDeviceHandle(iosDevice.trackDevices());
32+
export function watch() {
33+
const handle = iosDevice.watch();
34+
handle.on('change', devices => handle.emit('devices', devices.map(d => new Device(d))));
35+
return handle;
5936
}

src/provisioning.js

+8
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,18 @@ export function parseProvisioningProfileFile(file) {
116116
}
117117

118118
let data;
119+
const write = console._stderr && console._stderr.write;
120+
if (write) {
121+
console._stderr.write = () => {};
122+
}
119123
try {
120124
data = plist.parse(contents.substring(i, j + 8), path.basename(file));
121125
} catch (e) {
122126
return reject(new Error(`Unable to parse provisioning profile: ${e.message}`));
127+
} finally {
128+
if (write) {
129+
console._stderr.write = write;
130+
}
123131
}
124132

125133
const entitlements = data.Entitlements || {};

0 commit comments

Comments
 (0)