@@ -57,6 +57,7 @@ - (CDV_iOSDevice) getCurrentDevice
5757 device.iPad = (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad);
5858 device.iPhone = (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone);
5959 device.retina = ([mainScreen scale ] == 2.0 );
60+ device.iPhone4 = (device.iPhone && limit == 480.0 );
6061 device.iPhone5 = (device.iPhone && limit == 568.0 );
6162 // note these below is not a true device detect, for example if you are on an
6263 // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but
@@ -85,6 +86,21 @@ - (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(i
8586 } else {
8687 imageName = @" Default" ;
8788 }
89+
90+ // Add Asset Catalog specific prefixes
91+ if ([imageName isEqualToString: @" LaunchImage" ])
92+ {
93+ if (device.iPhone4 || device.iPhone5 || device.iPad ) {
94+ imageName = [imageName stringByAppendingString: @" -700" ];
95+ } else if (device.iPhone6 ) {
96+ imageName = [imageName stringByAppendingString: @" -800" ];
97+ } else if (device.iPhone6Plus ) {
98+ imageName = [imageName stringByAppendingString: @" -800" ];
99+ if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown) {
100+ imageName = [imageName stringByAppendingString: @" -Portrait" ];
101+ }
102+ }
103+ }
88104
89105 BOOL isLandscape = supportsLandscape &&
90106 (currentOrientation == UIInterfaceOrientationLandscapeLeft || currentOrientation == UIInterfaceOrientationLandscapeRight);
0 commit comments