@@ -57,6 +57,7 @@ - (CDV_iOSDevice) getCurrentDevice
57
57
device.iPad = (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad);
58
58
device.iPhone = (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone);
59
59
device.retina = ([mainScreen scale ] == 2.0 );
60
+ device.iPhone4 = (device.iPhone && limit == 480.0 );
60
61
device.iPhone5 = (device.iPhone && limit == 568.0 );
61
62
// note these below is not a true device detect, for example if you are on an
62
63
// 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
85
86
} else {
86
87
imageName = @" Default" ;
87
88
}
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
+ }
88
104
89
105
BOOL isLandscape = supportsLandscape &&
90
106
(currentOrientation == UIInterfaceOrientationLandscapeLeft || currentOrientation == UIInterfaceOrientationLandscapeRight);
0 commit comments