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
{{ message }}
This repository was archived by the owner on Jul 24, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 24, 2026. It is now read-only.
iphone 5 and iphone 6 ios device show blank screen in landscape mode for privacy screen #34
When ios application runs on landscape mode on iphone 5, 5s, 6, 6s device, when privacy screen is displayed, it shows an blank screen.
However, notice in the same testing, the splash screen just shows the portrait splash image. Although the portrait image is shown in landscape mode, it is still better than showning a blank screen to user.
When comparing the getImageName method in CDVSplashScreen.m has the below code:
if (device.iPhone5)
{ // does not support landscape
imageName = [imageName stringByAppendingString:@"-568h"];
}
else if (device.iPhone6)
{ // does not support landscape
imageName = [imageName stringByAppendingString:@"-667h"];
}
while in PrivacyScreenPlugin.m it has an extra check in the same code
if (device.iPhone5) { // does not support landscape
imageName = isLandscape ? nil :[imageName stringByAppendingString:@"-568h"];
} else if (device.iPhone6) { // does not support landscape
imageName = isLandscape ? nil : [imageName stringByAppendingString:@"-667h"];
}
A simple fix would be just remove the isLandScape?: condition check as CDVSplashScreen.m does.
The testing shows when using the portrait splash screen image for landscape privacy screen on iphone 5 and 6, the image is not scale very well, so it is better to provide a default landscape image for iphone 5 and 6 (Default-Landscape~iphone.png) in splash folder, and then update the related code as below:
if (device.iPhone5) {
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape"];
}
else{
imageName = [imageName stringByAppendingString:@"-568h"];
}
} else if (device.iPhone6) {
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape"];
}
else{
imageName = [imageName stringByAppendingString:@"-667h"];
}
} else if (device.iPhone6Plus) { // supports landscape
As cordova template for splash screen already has a image for iphone landscape ios 8,9 (Retina HD 5.5) using the file name of Default-Landscape-736h.png.
So it is better to use that image instead of create a new one. So the related code in getImageName method has been updated to
if (device.iPhone5) { // does not support landscape
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape-736h"];
}
else{
imageName = [imageName stringByAppendingString:@"-568h"];
}
} else if (device.iPhone6) { // does not support landscape
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape-736h"];
}
else{
imageName = [imageName stringByAppendingString:@"-667h"];
}
Activity
jonathanli2 commentedon Sep 10, 2016
The testing shows when using the portrait splash screen image for landscape privacy screen on iphone 5 and 6, the image is not scale very well, so it is better to provide a default landscape image for iphone 5 and 6 (Default-Landscape~iphone.png) in splash folder, and then update the related code as below:
if (device.iPhone5) {
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape"];
}
else{
imageName = [imageName stringByAppendingString:@"-568h"];
}
} else if (device.iPhone6) {
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape"];
}
else{
imageName = [imageName stringByAppendingString:@"-667h"];
}
} else if (device.iPhone6Plus) { // supports landscape
This works as expected in the testing.
Thanks
Jonathan
jonathanli2 commentedon Sep 12, 2016
As cordova template for splash screen already has a image for iphone landscape ios 8,9 (Retina HD 5.5) using the file name of Default-Landscape-736h.png.
So it is better to use that image instead of create a new one. So the related code in getImageName method has been updated to
if (device.iPhone5) { // does not support landscape
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape-736h"];
}
else{
imageName = [imageName stringByAppendingString:@"-568h"];
}
} else if (device.iPhone6) { // does not support landscape
if (isLandscape){
imageName = [imageName stringByAppendingString:@"-Landscape-736h"];
}
else{
imageName = [imageName stringByAppendingString:@"-667h"];
}