File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
93
93
try {
94
94
const xcodeVersion = xcode . getXcodeVersionData ( ) ;
95
95
xcodeMajorVersion = + xcodeVersion . major ;
96
- } catch ( err ) {
96
+ } catch ( err ) {
97
97
// Ignore the error.
98
98
}
99
99
@@ -165,7 +165,10 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
165
165
public startSimulator ( device ?: IDevice ) : void {
166
166
device = device || this . getDeviceToRun ( ) ;
167
167
168
- this . verifyDevice ( device ) ;
168
+ // In case the id is undefined, skip verification - we'll start default simulator.
169
+ if ( device . id ) {
170
+ this . verifyDevice ( device ) ;
171
+ }
169
172
170
173
if ( ! this . isDeviceBooted ( device ) ) {
171
174
let bootedDevice = this . getBootedDevice ( ) ;
@@ -181,9 +184,8 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
181
184
}
182
185
}
183
186
184
- private verifyDevice ( device ? : IDevice ) : void {
187
+ private verifyDevice ( device : IDevice ) : void {
185
188
const availableDevices = this . getDevices ( ) ;
186
-
187
189
if ( ! _ . find ( availableDevices , { id : device . id } ) ) {
188
190
errors . fail ( `No simulator image available for device identifier '${ device . id } '.` ) ;
189
191
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ios-sim-portable" ,
3
- "version" : " 3.1.0 " ,
3
+ "version" : " 3.1.1 " ,
4
4
"description" : " " ,
5
5
"main" : " ./lib/ios-sim.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments