New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-launchscreen-storyboard

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-launchscreen-storyboard

Cordova LaunchScreen Storyboard Plugin

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-30%
Maintainers
1
Weekly downloads
 
Created
Source

npm npm npm

cordova-plugin-launchscreen-storyboard

A cordova plugin for using a launch screen storyboard as the splash screen instead of an image

A common use case for this plugin is to control the default CDVLaunchScreen storyboard launch screen.

Installation

cordova plugin add cordova-plugin-launchscreen-storyboard

or via github

cordova plugin add https://github.com/toddbluhm/cordova-plugin-launchscreen-storyboard.git

Usage

Add the following code to your config.xml to get the plugin with default settings:

<plugin name="cordova-plugin-launchscreen-storyboard" spec="~2.0.0" />

The following preferences can be configured:

<preference name="StoryboardName" value="YOUR_STORY_BOARD_NAME" />
<preference name="FadeOut" value="true" />
<preference name="FadeOutDuration" value="0.5" />

NOTE: StoryboardName must match the name of your "Launch Screen File" in Xcode, or a null-pointer exception will follow. If your StoryboardName is not CDVLaunchScreen, you must specify it in your config.xml.

Once the plugin is setup you must now tell it when to fade out. You can do this by setting up a handler in index.html for the deviceready event.

Something like the following should work:

document.addEventListener("deviceready", function() {
  window.LaunchScreen.hide();
}, false);

Preferences

  • StoryboardName - The name of the storyboard that contains your launch screen view controller. This will only instantiate the top level view controller in the storyboard. (Default: CDVLaunchScreen)

  • FadeOut - Enable/Disable the view fading out when its told to hide(). This uses an EaseOut function.

  • FadeOutDuration - How long should the fade out last (in seconds).

API

These are the javascript APIs exposed off of the window.LaunchScreen object.

  • hide( callback ) - Hides the launch screen. Usually called in the deviceready event handler. The callback is called after the launch screen is fully hidden. callback has an error param which will be null or an error object if an error occurred.

  • show( callback ) - Shows the launch screen. Should never need to be called in practice. The callback is called after the launch screen is fully visible. callback has an error param which will be null or an error object if an error occurred.

Supported Platforms

  • iOS

Contributors

  • Daniel Cousens

Contributing Guide

I welcome all pull requests. Before opening a PR please make sure to run the following script if you have modified any js files:

  • npm run lint checks for code errors and formats according to js-standard

Keywords

FAQs

Package last updated on 05 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc