I can't seem to get my splash screen to show instead of the default. I have these lines in my config.xml:
<gap:splash src="splash.png" />
<gap:splash src="splash/screen1.png" gap:platform="ios" width="320" height="480" />
I have splash.png in both the upper root and the root of www (not sure which is the right one). I'm using the regular iPhone simulator (not 4 or 5) and I've also tried building/hydrating and sending to my 3gs and it still uses the default. I also tried replacing the default splash screen files in the Resources/splash/ folder but that doesn't work either.
Edit: Also tried putting in every type of width/height specified for iphones, still no go.
I forgot Phonegap can be a buggy POS sometimes. I had to delete the app from my device then re-add it (not hydrating) and the splash screen shows now. Still not working on the simulator, though.
Related
Does Cordova support single-size icons for iOS and if so, how to add it to config.xml?
I removed all the different icon sizes and just left
<icon height="1024" src="src/resources/images/Icons/ios/Icon-App-1024x1024.png" width="1024" />
But either way, I only get the default Cordova icon to display.
If I set it to single size in Xcode it works as expected.
Deployment is through Azure Pipeline, so I can´t set it manually for release.
I have a problem with the apache cordova (with ionic 3), this issue only happens on iphone X.
When the app starts, it displays the default ionic splash screen (like this, but scaled):
And after some milliseconds this "default splash screen" gets replaced by the correct one (the splash that I designed for the app).
These are my splash images:
<splash src="resources/ios/splash/Default#2x~iphone.png" />
<splash src="resources/ios/splash/Default#2x~universal~anyany.png" />
<splash src="resources/ios/splash/Default-568h#2x~iphone.png" />
<splash src="resources/ios/splash/Default-667h.png" />
<splash src="resources/ios/splash/Default-736h.png" />
<splash src="resources/ios/splash/Default-Landscape#2x~ipad.png" />
<splash src="resources/ios/splash/Default-Landscape#~ipadpro.png" />
<splash src="resources/ios/splash/Default-Landscape-736h.png" />
<splash src="resources/ios/splash/Default-Landscape~ipad.png" />
<splash src="resources/ios/splash/Default-Portrait#2x~ipad.png" />
<splash src="resources/ios/splash/Default-Portrait#~ipadpro.png" />
<splash src="resources/ios/splash/Default-Portrait~ipad.png" />
<splash src="resources/ios/splash/Default~iphone.png" />
I also tried changing the Launch Screen File (Also checking the default CDVLaunchScreen) and I don't find any reference to this default ionic splash screen, how can I find where is this "image" or whatever, or find a solution?
Thanks
There have been several reported issues relating to the Cordova splashscreen and iPhone X, however none of them exhibit the symptom you're describing.
The first thing to check is that you've definitely replaced all the default splashscreen images in resources/ios/splash/ with your own custom ones.
Secondly check you are using the most recent versions of the cordova-ios platform and cordova-plugin-splashscreen since recent releases have incorporated fixes for some of these iPhone X-specific issues.
Finally, another option is to switch to using LaunchStoryboard images for your splashscreens.
This is the newer way to do iOS splashscreens and easier to maintain than the legacy Launch Images, since you need less images - it's even possible to have a single launch screen image.
I have not the exact solution but i tried with this solution and its working fine.
First open Xcode and set splash screen of iphoneX 1125 × 2436 px image into (project name)->Resources->images.xassests folder then select LaunchImages see below image.
I resolved the issue by upgrading Cordova Splashscreen plugin.
cordova plugin rm cordova-plugin-splashscreen --save
cordova plugin add cordova-plugin-splashscreen#latest
cordova prepare
Thanks to #Jaydeep Kataria, I digged a bit deeper and found a solution (!!!)
In my case, app was missing a splash screen for iPhoneX portrait, so:
Open XCode and go to Resources/Images.xcassets
Select missing image and take a look at the right side bar
From the right side bar get the image File Name (e.g. Default-2436h.png) and an image size (e.g. 2436 x 1125)
Make an image of a proper size, make its file name exactly as it displayed in the right side bar of XCode and put to folder src-cordova/res/screen/ios
Add the link to the image into your config.xml file:
<splash height="2436" src="res/screen/ios/Default-2436h.png" width="1125" />
Build the project and open it in XCode
That's it !!!
I have a simple Cordova app that has a splash screen. In config.xml I have this: <splash src="www/img/splash.png" />. On Android, I see the custom image, on iOS I see the default Cordova image.
I've seen the docs in https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ which describe a setup with something like 30 different images at different resolutions etc. I would prefer to not do that, I just want the same behavior as for Android, show the one image I have scaled to fit.
How do I do that?
This is your solution:
Once the image is created, you can include it in your project by
adding the following to config.xml:
<splash src="res/screen/ios/Default#2x~universal~anyany.png" />
Because only one image is provided, iOS will utilize it in every
context.
I can't make the splash screen stay until the page is loaded.
I have read every entry in the first, second and third page of google search. I read all the questions posted here on stackoverflow including A good explanation but none seem to work.
What's worse is that the behavior I'm seeing is all wrong. Following the instructions here I added alert at the deviceready event and I saw it happens after the white page is gone and my initial page is loaded.
I installed the plugin and included the following in the root level config.xml:
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen" />
<param name="onload" value="true" />
</feature>
<preference name="AutoHideSplashScreen" value="false" />
I am still getting Splash->White screen->My initial page.
I am using Cordova 3.3.0 with ionicframework.
What am I doing wrong?
EDIT
I think it might have something to do with this error message:
The splashscreen image named Default-Portrait was not found
I have just had the same issue and found that Gopal's answer was not the solution (as I already had my files named and sized correctly).
Instead I found this answer to be correct: Cordova 3.4 iOS white screen after splash
Alternate solution in brief:Duplicate your "Default#2x~iphone.png" and rename it to "Default-Portrait#2x~iphone.png". Then drag that file into your Project Files in XCode under "Resources/Splash" so that it is recognised when Xcode builds.
If cordova-plugin-splashscreen can not find images, you can specify UILaunchImageFile key in plist.
<key>UILaunchImageFile</key>
<string>LaunchImage</string>
Gorpal said in a comment
Please make sure you are using right names and size of splash screen. Default-Portrait~ipad.png -- 768 x 1004 Default-Portrait#2x~ipad.png - 1536 x 2008 Default~iphone.png - 240x 320 Default#2x~iphone.png - 640x960 Default-568h#2x~iphone.png - 640x1136
which worked for me. It's all about the correct name.
For me I just added the key, Launch Image on the Info tab, similar to Nikita's answer:
Having some app icon with a Blackberry application built using Phonegap. When it installs I can see the application icon on the device. However after using the app a couple of times the icon is replaced by a generic folder icon.
I have the icon in a folder inside the root folder like - appfolder/images/icon.png.
When I go to setup to manage the applications the application icon is visible and shows up alongside the app. Any suggestions?
EDIT Happens when the app crashes due to low memory...
Check your config.xml and make sure you have the following line in it:
<icon src="images/icon.png" width="72" height="72" />
Point it to the image you'd like to be your icon. You can even specify the width and height depending on the resolution.