1313
1414NSString *simulatorPrefrencesName = @" com.apple.iphonesimulator" ;
1515NSString *deviceProperty = @" SimulateDevice" ;
16- NSString *deviceIphoneRetina = @" iPhone (Retina 3.5-inch)" ;
16+ NSString *deviceIphoneRetina3_5Inch = @" iPhone (Retina 3.5-inch)" ;
17+ NSString *deviceIphoneRetina4_0Inch = @" iPhone (Retina 4-inch)" ;
1718NSString *deviceIphone = @" iPhone" ;
1819NSString *deviceIpad = @" iPad" ;
1920NSString *deviceIpadRetina = @" iPad (Retina)" ;
@@ -41,6 +42,7 @@ - (void) printUsage {
4142 fprintf (stderr, " --sdk <sdkversion> The iOS SDK version to run the application on (defaults to the latest)\n " );
4243 fprintf (stderr, " --family <device family> The device type that should be simulated (defaults to `iphone')\n " );
4344 fprintf (stderr, " --retina Start a retina device\n " );
45+ fprintf (stderr, " --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))\n " );
4446 fprintf (stderr, " --uuid <uuid> A UUID identifying the session (is that correct?)\n " );
4547 fprintf (stderr, " --env <environment file path> A plist file containing environment key-value pairs that should be set\n " );
4648 fprintf (stderr, " --setenv NAME=VALUE Set an environment variable\n " );
@@ -237,7 +239,7 @@ - (int)launchApp:(NSString *)path withFamily:(NSString *)family
237239 }
238240 }
239241
240- [self changeDeviceType: family retina: retinaDevice];
242+ [self changeDeviceType: family retina: retinaDevice isTallDevice: tallDevice ];
241243
242244 /* Start the session */
243245 session = [[[DTiPhoneSimulatorSession alloc ] init ] autorelease ];
@@ -254,7 +256,7 @@ - (int)launchApp:(NSString *)path withFamily:(NSString *)family
254256 return EXIT_SUCCESS;
255257}
256258
257- - (void ) changeDeviceType : (NSString *)family retina : (BOOL )retina {
259+ - (void ) changeDeviceType : (NSString *)family retina : (BOOL )retina isTallDevice : ( BOOL ) isTallDevice {
258260 NSString *devicePropertyValue;
259261 if (retina) {
260262 if (verbose) {
@@ -264,7 +266,11 @@ - (void) changeDeviceType:(NSString *)family retina:(BOOL)retina {
264266 devicePropertyValue = deviceIpadRetina;
265267 }
266268 else {
267- devicePropertyValue = deviceIphoneRetina;
269+ if (isTallDevice) {
270+ devicePropertyValue = deviceIphoneRetina4_0Inch;
271+ } else {
272+ devicePropertyValue = deviceIphoneRetina3_5Inch;
273+ }
268274 }
269275 } else {
270276 if ([family isEqualToString: @" ipad" ]) {
@@ -288,6 +294,7 @@ - (void)runWithArgc:(int)argc argv:(char **)argv {
288294 }
289295
290296 retinaDevice = NO ;
297+ tallDevice = NO ;
291298 exitOnStartup = NO ;
292299 alreadyPrintedData = NO ;
293300 startOnly = strcmp (argv[1 ], " start" ) == 0 ;
@@ -379,6 +386,8 @@ - (void)runWithArgc:(int)argc argv:(char **)argv {
379386 NSLog (@" stderrPath: %@ " , stderrPath);
380387 } else if (strcmp (argv[i], " --retina" ) == 0 ) {
381388 retinaDevice = YES ;
389+ } else if (strcmp (argv[i], " --tall" ) == 0 ) {
390+ tallDevice = YES ;
382391 } else if (strcmp (argv[i], " --args" ) == 0 ) {
383392 i++;
384393 break ;
0 commit comments