You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I'm aware that v3.2.0 is intended to be the last 3.x release, and that v4 has removed all native code and uses Node.js instead, so I understand if this bug won't be fixed.) #145 (which has now been merged into the 3.x branch) introduced this code in the handler for the --devicetypeid option in Source/iPhoneSimulator.m:
if (![deviceTypeId containsString:deviceTypeIdPrefix]) {
deviceTypeId = [deviceTypeIdPrefix stringByAppendingString:deviceTypeId];
}
containsString: returns YES if the target string is contained within the receiver. This is the same as calling rangeOfString:options: with no options, thus doing a case-sensitive, non-literal search.
So when the --devicetypeid option is used on Mavericks, a crash occurs:
node_modules/.bin/ios-sim launch Simulator-4.0.3.app --devicetypeid iPhone-6
2015-07-30 11:55:14.775 ios-sim[19650:507] -[__NSCFString containsString:]: unrecognized selector sent to instance 0x7ffbdb601040
2015-07-30 11:55:14.777 ios-sim[19650:507] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsString:]: unrecognized selector sent to instance 0x7ffbdb601040'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9139925c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8d2ade75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff9139c12d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff912f7272 ___forwarding___ + 1010
4 CoreFoundation 0x00007fff912f6df8 _CF_forwarding_prep_0 + 120
5 ios-sim 0x0000000106e824b5 -[iPhoneSimulator runWithArgc:argv:] + 1325
6 ios-sim 0x0000000106e82e1a main + 101
7 ios-sim 0x0000000106e80020 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
I think this bug could easily be fixed by using rangeOfString instead of containsString.
(I'm aware that v3.2.0 is intended to be the last 3.x release, and that v4 has removed all native code and uses Node.js instead, so I understand if this bug won't be fixed.)
#145 (which has now been merged into the 3.x branch) introduced this code in the handler for the
--devicetypeid
option inSource/iPhoneSimulator.m
:containsString
was introduced in Yosemite:So when the
--devicetypeid
option is used on Mavericks, a crash occurs:I think this bug could easily be fixed by using
rangeOfString
instead ofcontainsString
.The text was updated successfully, but these errors were encountered: