Phonegap Build iOS 7 and 8 Statusbar control - ios

I am trying to control the font color of the iOS 7 & 8 status bar. I am constantly seeing two different plugins being referenced with a slate full of <preferences/>. I am hoping someone can shed some light on the difference between the two and which they have had success implementing.
<gap:plugin name="com.phonegap.plugin.statusbar" />
<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance">
<false/>
</gap:config-file>
and
<gap:plugin name="org.apache.cordova.statusbar" />
<preference name="StatusBarStyle" value="lightcontent" />
I have tried both and can't get the font color to be light (white). Thank you in advance for any guidance you can give here.

Just change the value to darkcontent. This is iOS.
The plugin i'm using is
org.apache.cordova.statusbar
You should use the correct plugin if you are using phonegap. I'm using Cordova 3.6
This is how I get the status bar to act like a "normal" status bar.
<preference name="StatusBarStyle" value="darkcontent" />
<preference name="StatusBarOverlaysWebView" value="false" />
My config.xml:
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarStyle" value="darkcontent" />

Related

Ionic splashscreen hide() method in platform ready doesn't work

I have problem to hide splashscreen after platform is ready. This is problem only on ios, only on testflight app. I can't build it with cordova 10 locally. When I build locally app with cordova 9 (this is only difference), this method is working.
this.platform.ready().then(() => {
this.splashscreen.hide()
});
I'm sure that all imports are ok, all is installed.
package.json: "cordova-ios": "^6.1.0", "cordova-plugin-splashscreen": "^6.0.0",
config.xml - splashscreen values
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="1000" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="loadUrlTimeoutValue" value="700000" />
<preference name="SplashScreenDelay" value="30000" />
<preference name="DisallowOverscroll" value="true" />
<preference name="FadeSplashScreen" value="false" />
Anyone has idea? I tried add setTimout, it doesn't work.
We ran into the same problem. In cordova-ios#6.x they pulled the splashscreen plugin into the platform itself. This can also be seen in the Supported Platforms in the latest docs.
What we found was that the call to .hide() seems to trigger the hide after SplashScreenDelay. So if you get rid of your SplashScreenDelay setting, I bet your calls to Hide() will start working as you expect (since you have AutoHideSplashScreen set to false already).
If you are like me, and you want the auto-hide ability AND the ability to manually call hide, you can consider just triggering a .hide() in a timer, which will fire as a backup plan (in case your other .hide() doesn't fire). It seems there is no negative impacts of calling .hide() twice.
//Poor-man's Auto-Hide
Observable.timer(15000).subscribe(()=>{
this.splashScreen.hide();
});

multitask iOS (Slide Over, Split View) on Cordova App (IntelXDK )

I have created an app in IntelXDK using cordova CLI version 6.2.0
I would like to activate the multitask for iPad, and it is impossible for me now.
I have search for plugins but none is working. I am using the cordova-plugin-splashscreen, and I have tried to configure the Launch storyboard images (because I think is the reason that It is not working the multitask).
I have configure the config.additions.xml right that:
<platform name="ios">
<resource-file src="package-assets/ios/res/Launch Screen.storyboard" target="Launch Screen.storyboard" />
<splash src="package-assets/ios/res/Default#2x~universal~anyany.png" />
<splash src="package-assets/ios/res/Default#2x~universal~comany.png" />
<splash src="package-assets/ios/res/Default#2x~universal~comcom.png" />
<splash src="package-assets/ios/res/Default#3x~universal~anyany.png" />
<splash src="package-assets/ios/res/Default#3x~universal~anycom.png" />
<splash src="package-assets/ios/res/Default#3x~universal~comany.png" />
<!-- below requires the splash screen plugin -->
<!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="FadeSplashScreen" value="false"/>
<preference name="FadeSplashScreenDuration" value="750"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
<!-- below requires the status bar plugin -->
<!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
<!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="StatusBarStyle" value="lightcontent" />
As you can see, I have tried to create the spash for storyboard and the screen.storyboard
It is working now, like if I had never change anything.
I am really lost, and I need some help.
Thanks in advance.

How to increase Splash Screen time in ionic for IOS devices

I need to increase time delay of splash screen in ios devices. I'm using IONIC.
Following is my config file:
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen"/>
<param name="onload" value="true" />
</feature>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="orientation" value="portrait"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="8000"/>
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="auto-hide-splash-screen" value="false" />
It's working in Android device by simply adjusting SplashScreenDelay. I don't know why splash screen is hiding automatically after setting AutoHideSplashScreen is false.
You can disable the automatic handling of splash screen and programmatically hide it when the app is ready.
Originally from ionicframework forum (with slight changes):
Install the cordova splashscreen plugin:
cordova plugin add cordova-plugin-splashscreen
Make sure you have the following in config.xml of your project:
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
In app.js, add the following in the run method:
setTimeout(function() {
navigator.splashscreen.hide();
}, 100);
After adding, the code should look as follows:
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide splash screen
setTimeout(function() {
navigator.splashscreen.hide();
}, 100);
// some other things
});
})
We can implement this by installing cordova splashscreen plugin .For more refer link http://learn.ionicframework.com/formulas/splash-screen/
cordova plugin add org.apache.cordova.splashscreen
app.run(function($cordovaSplashscreen) {
setTimeout(function() {
$cordovaSplashscreen.hide()
}, 5000)
})
platforms\android\cordova\default.xml
You can add default configuration that is needed for config.xml.
At run time config.xml will changed by ionic framework so needs to change in default.xml will refelect in config.xml too.

Fade splash screen after delay on iOS 7 with PhoneGap 3.2

PhoneGap 2.5 permitted users to fade out the splash screen after a delay (http://docs.phonegap.com/en/2.5.0/guide_project-settings_ios_index.md.html), but the functionality seems no longer documented in PhoneGap 3.2. If the functionality was removed, is there another way of accomplishing this within PhoneGap, or do we need to programmatically implement this by adding the Splash Screen plugin ourselves?
We already tried adding <preference name="fade-splash-screen-duration" value="5" />
to the config.xml file under the project folder, but it had no effect.
Thanks
Try adding this in the config.xml
<preference name="auto-hide-splash-screen" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="fade-splash-screen-duration" value="5" />
and this in the onDeviceReady();
setTimeout(function() {
navigator.splashscreen.hide();
}, 1000);
Kevin's example works, but the only preference actually required is:
<preference name="AutoHideSplashScreen" value="false" />

Setting AutoHideSplashScreen has no effect in Cordova 3.0.0 for iOS

Setting AutoHideSplashScreen to false has no effect in Cordova 3.0.0 for iOS.
I'd like to control the splash screen by my own. Since the app needs some seconds to render the view it needs to be shown a bit longer.
The 'navigator.splashscreen' is installed within the project.
Is there any workaround i can apply to this?
Note
I mentioned that setting FadeSplashScreen and FadeSplashScreenDuration do also have no effect.
What am i doing wrong? Or is it a bug?
A solution was posted on this Cordova JIRA Issue CB-4374:
Try adding this in your config.xml for the Splashscreen plugin:
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen"/>
<param name="onload" value="true" />
</feature>
The solution in the JIRA thread is to use the updated code at https://github.com/apache/cordova-plugin-splashscreen/blob/master/src/ios/CDVSplashScreen.m and to add an onload parameter in config.xml:
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen"/>
<param name="onload" value="true" />
</feature>
<preference name="phonegap-version" value="3.1.0" />
<preference name="orientation" value="portrait" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="auto-hide-splash-screen" value="false" />
<preference name="AutoHideSplashScreen" value="false" />

Resources