Skip to content

Commit 05ea7bf

Browse files
Merge pull request #85 from telerik/vladimirov/fix-ipad
Fix detection of iPad Pro
2 parents c78aa88 + 58c25b3 commit 05ea7bf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/simctl.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,14 @@ export class Simctl implements ISimctl {
8787
for (let line of match[0].split('\n').slice(1)) {
8888
// a line is something like
8989
// iPhone 4s (A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E) (Shutdown)
90+
// iPad Air 2 (9696A8ED-3020-49FC-90D6-DAFD29A0EA8D) (Shutdown)
91+
// iPad Pro (9.7 inch) (7FF984D4-0755-432D-BE0E-6EB44F0489CB) (Shutdown)
92+
// iPad Pro (12.9 inch) (F02012C8-6D4D-46FF-90D7-5DF90EF579E8) (Booted)
9093
// retrieve:
9194
// iPhone 4s
9295
// A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E
9396
// Shutdown
94-
let lineRegex = /^ ([^\(]+) \(([^\)]+)\) \(([^\)]+)\)( \(([^\)]+)\))*/;
97+
let lineRegex = /^\s+(.*?)\s+\(([0-9A-F]{8}(?:-[0-9A-F]{4}){3}-[0-9A-F]{12})\)\s+\((.*?)\)(\s+\((?:.*?)\))?/;
9598
let lineMatch = lineRegex.exec(line);
9699
if (lineMatch === null) {
97100
errors.fail('Could not match line. ' + line);

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {
@@ -44,4 +44,4 @@
4444
"engines": {
4545
"node": ">=4.2.1 <5.0.0 || >=5.1.0 <8.0.0"
4646
}
47-
}
47+
}

0 commit comments

Comments
 (0)