Cordova iOS single size icon support - ios

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.

Related

how to fix cordova navbar that falls down on IOS only?

I'm submitting cordova build to android and ios.. unfortunately on ios, navbar falls down in every menu.
White space on top
Navbar pushed down and not sticking to top when scrolling
I'm using node.js v8.11.2, cordova 8.0.0, 9.0 ios deployment target and i've tried in every iphone, navbar keeps falls down.
<preference name="StatusBarOverlaysWebView" value="false"/>
<preference name="StatusBarBackgroundColor" value="#000000"/>
<preference name="StatusBarStyle" value="lightcontent"/>
I also read some post about IOS status bar problem and tried to add some code above to config.xml and still not working as expected.
Isn’t it because on top of iOS displays are system info data (time, Wi-Fi etc.). So app is basically pushed down, so best way for me was specify “StatusBarBackgroundColor” to correspond with your navbar.
Steve

double ionic splash screen in iPhone X

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 !!!

How to use a single image for ios splash screen in Cordova

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.

Removing splash-screen loading gif from Cordova app

I'm having a problem overriding Cordova's defaults when writing an app.
I'm writing an iOS app using the Cordova (formerly PhoneGap) framework and Xcode. Cordova lets me add a splash screen for the project by just dragging and dropping it in under the info tab for my project in Xcode. This part works fine, but there is a default loading-indicator gif running over the top of the splash image (I'm not sure whether it's from Xcode or from Cordova).
How can I remove the loading-indicator image?
You can remove the loading spinner in Cordova.plist. Set ShowSplashScreenSpinner to false.
Update:
In Cordova 3.0+ adding <preference name="ShowSplashScreenSpinner" value="false" /> to your config.xml will accomplish the same goal.
I just removed the Launch images source and set the launch screen file to mainviewcontroller
Go to General Setting -> at bottom side Launch images resource and launch screen setting is available
If you have an IOS device i have a working method that you can use, it solved my problem when compiling for IOS. (Firstly i want to say you need to add an icon and splash in the correct folders or else Cordova will their default ones for you and also make sure that they are large enough so that the resources can be generated accordingly):
Remove the SplashScreen plugin provided using
cordova plugin rm cordova-plugin-splashscreen
Place your icon in the resources/ios/ folder and name it
icon.png
Go to the route of your directory and add your splash image (make sure that splash.png is 2800px * 2800px)
splash.png
Remove the ios platform if you installed it already and then re add it
ionic cordova platform rm ios
ionic cordova platform add ios
5.Run the following command to generate your icon
ionic cordova resources ios --icon
if building for android
ionic cordova resources android --icon
6.Add the following lines to your config.xml
<preference name="SplashScreen" value="none" />
<preference name="SplashScreenDelay" value="0" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
This should solve the default icon and remove the splash screen which Cordova adds to the IOS project by default. I hope it helps!

app icon replaced blackberry

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.

Resources