Ionic Splashscreen - How to remove fade? - ionic-framework

I have the cordova splashscreen plugin working in my ionic project - except that I don't want the spashscreen to fade in. I've got the following in my config file but it doesn't seem to make any difference:
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="1000" />
<preference name="SplashMaintainAspectRatio" value="false" />
<preference name="SplashShowOnlyFirstTime" value="true" />
<preference name="FadeSplashScreen" value="false"/>
<preference name="FadeSplashScreenDuration" value="0"/>
The splash screen still fades in for 3 seconds. What am I missing?
I'm using Cordova version 5.4.1 and version 3.2.2 of the splashscreen plugin.

<preference name="SplashScreenDelay" value="6000"/>
Add this in your config.xml. and adjust its value as required.
Earlier you were setting value of FadeSplashScreen to false , which was good because you did not want your splashscreen to fade in.But that was also the reason why any changes in your FadeSplashScreenDuration was not working.

Related

WKWebView instead of UIWebView - Ionic

New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.
This is the issue I am facing when developed the App in IONIC and trying to upload the app to appstore.
Add plugin cordova-plugin-wkwebview-engine, preferably the latest version
Make sure you have this in your config.xml and
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>

Ionic white screen on IOS startup

I'm developing an app with Ionic in version 3 but I'm having a problem with the build for IOS, just for IOS.
For several days I researched and did not find a solution to my problem, able to compile the last two versions without problem, but now that I need to release another version, but it is not going.
Only the build for iOS is giving trouble.
The problem
After the build, testing on a real device, the application enters the splashscreen and exits, entering a white screen that does not come out at all.
This occurs only in the build with the --prod flag. When I run in debug mode it works perfectly, with livereload and everything else.
Information
In the XCode console the only thing I see is all startup, and when the app is locked, on the white screen I see: TIC Read Status [10: 0x0]: 1:57 and TIC Read Status [11: 0x0]: 1:57
Any attempt to help is welcome. Thanks in advance!
I had a similar issue and nothing seemed to be working.
In the end, I added the browser as a platform.
ionic cordova platform add browser
Then, I tried to run that as production and it was from there, that I was able to diagnose the problem more, because the errors were shown then in the console.
ionic cordova run browser --prod --release
I didn't have much luck with XCode showing me and real errors.
I got a similar issue recently. Are you using ionic SplashScreen plugin? Can you try performing a clean installation after deleting node_modules, platforms and plugins directories.
If it didn't work update your app.component.ts like this.
import { SplashScreen } from '#ionic-native/splash-screen';
export class MyApp {
...
constructor(... public splashScreen: SplashScreen, ...) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
...
setTimeout(() => {
this.splashScreen.hide();
}, 2000);
...
});
}
In your config.xml set this perference.
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="ShowSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="FadeSplashScreen" value="false" />

Phonegap Build Facebook Login

I have in an app for Android/iOS with a plugin "com.phonegap.plugins.facebookconnect" to login with Facebook. It's not working anymore so I thought I should have to change it for another one, anyway it won't compile anymore case Phonegape Build has got rid of their Repository.
Problem is that any plugin I try that is in https://cordova.apache.org/plugins/ ... Throw the same error message when trying to compile:
Error - One of your plugins requires a parameter - You can fix this
here
I tried:
cordova-plugin-facebook
cordova-plugin-facebook4
xenious-cordova-plugin-facebook4
cordova-plugin-facebook-account-kit
etc ..
And I defined them in config.xml in all different ways possible:
<plugin name="plugin-name" source="npm" >
<param name="APP_ID" value="123456" />
<param name="APP_NAME " value="name" />
<plugin>
<plugin name="plugin-name" source="npm" >
<params>
<param name="APP_ID" value="123456" />
<param name="APP_NAME " value="name" />
</params>
<plugin>
<plugin name="plugin-name" source="npm" >
<variable name="APP_ID" value="123456" />
<variable name="APP_NAME " value="name" />
<plugin>
APP_ID for some of the plugins is FACEBOOK_APP_ID and another one has one more value: AK_TOKEN. Just put examples of how I define them in config.xml
Funny is that if I don't put anything just the plugin without parameters, the message is different:
Error - One of your plugins requires a parameter: APP_ID, APP_NAME,
AK_TOKEN - You can fix this here
I made a new "Hello world" app without any plugin but this one and it is the same. I'm running out of ideas. Do I have to define those parameters somewhere else? Didn't use to be that way with the previous plugin I had. Any help?
You must set the parameters as follows:
<plugin name="cordova-plugin-facebook4">
<params>
<param name="APP_ID" value="XXXXXXX" />
<param name="APP_NAME" value="XXXXXXX" />
</params>
</plugin>
preference set in config.xml
<preference name="android-minSdkVersion" value="15" />
hope this helps.
I could finally make it work.
<plugin name="cordova-plugin-facebook4" source="npm" spec="1.7.4">
<param name="APP_ID" value="XXXXXXX" />
<param name="APP_NAME" value="XXXXXXXX" />
</plugin>
The difference was the spec"1.7.4" ...
After that, the build sent me a message that I had to define the android-minSdkVersion at the minimum necessary for the plugin, by default 14 if not stated. So placed this line also in config.xml
<preference name="android-minSdkVersion" value="15" />

ionic 2 blank screen error (sometime black/white) along with Application Error on Android

Getting this error:
Displayed splash.
Displayed black/White Screen.
Application Error!
"ionic info" output..
Working Solution:
adding these to config.xml
<preference name="loadUrlTimeoutValue" value="60000" />
<preference name="AutoHideSplashScreen" value="false" />

Splash screen in ionic framework cordova not working

This is my code
angular.module('starter.controllers', ['ngCordova'])
.run(function ($ionicPlatform) {
$ionicPlatform.ready(function () {
setTimeout(function () {
navigator.splashscreen.hide();
}, 500);
});
})
Are you trying to hide the splash screen? If you are, why not set up your splash to be a blank image? Find a high res blank png and run the command ionic resources --splash and this will generate your splash image for all the devices.
Have a look a Cordova's documentation or the documentation on npm repository: you might need to set some preferences in config.xml.
First, the following is not mentioned on the first site but it might solve your problem:
<preference name="SplashScreen" value="screen" />
Maybe you could also have to change some settings such as disabling autohide (you already hide the splash screen manually when you hide your app so it shouldn't be a problem) :
<preference name="AutoHideSplashScreen" value="false" />
Note :
As Joseph Ocasio already mentioned, don't forget either to generate your resources with the Ionic CLI.
To generate all (application icons + splash screen images) :
ionic resources
To generate splash screen images only :
ionic resources --splash
Be sure that you have got already installed the plugin cordova-splash-screen (cordova plugin add cordova-plugin-splashscreen --save)
Then check you config.xml file and add this
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="Fullscreen" value="false" />
It should be work :)