Skip to content

Commit b9957b7

Browse files
Merge pull request #84 from telerik/vladimirov/fix-detection-of-ipad
Fix detection of iPad Pro
2 parents 0a21a08 + 08b43cb commit b9957b7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/simctl.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,14 @@ export class Simctl implements ISimctl {
9797
for (let line of match[0].split('\n').slice(1)) {
9898
// a line is something like
9999
// iPhone 4s (A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E) (Shutdown)
100+
// iPad Air 2 (9696A8ED-3020-49FC-90D6-DAFD29A0EA8D) (Shutdown)
101+
// iPad Pro (9.7 inch) (7FF984D4-0755-432D-BE0E-6EB44F0489CB) (Shutdown)
102+
// iPad Pro (12.9 inch) (F02012C8-6D4D-46FF-90D7-5DF90EF579E8) (Booted)
100103
// retrieve:
101104
// iPhone 4s
102105
// A99FFFC3-8E19-4DCF-B585-7D9D46B4C16E
103106
// Shutdown
104-
let lineRegex = /^ ([^\(]+) \(([^\)]+)\) \(([^\)]+)\)( \(([^\)]+)\))*/;
107+
let lineRegex = /^\s+(.*?)\s+\(([0-9A-F]{8}(?:-[0-9A-F]{4}){3}-[0-9A-F]{12})\)\s+\((.*?)\)(\s+\((?:.*?)\))?/;
105108
let lineMatch = lineRegex.exec(line);
106109
if (lineMatch === null) {
107110
errors.fail('Could not match line. ' + line);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "1.6.1",
3+
"version": "1.6.2",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {

0 commit comments

Comments
 (0)