Download the PHP package unloc/nativephp-enhanced-splash without Composer

On this page you can find all versions of the php package unloc/nativephp-enhanced-splash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nativephp-enhanced-splash

Enhanced Splash for NativePHP Mobile

Take control of your app's launch screen: no visible jump on Android, and a polished iOS launch screen generated from your app icon — no design work required.

Why "enhanced"

Android shows two splashes, and you only control one of them. Since Android 12 the system draws its own splash on every cold start — your launcher icon on a flat background — and it cannot be turned off. Only after that does NativePHP's own overlay fade in your splash.png. The system half is hardcoded white or black, so unless your splash art happens to be black too, users see a cut in the middle of your app opening.

This plugin fixes it two ways, and you pick:

iOS launch screens usually mean commissioning artwork. Every device size, light and dark. With ios.mode = 'icon' you don't design anything: the plugin takes the app icon you already have, masks it to the iOS squircle, centers it on the background color you choose, and uses that for both of iOS's launch phases. It looks deliberate, and it takes one config line.

And if you do have artwork, public/splash.svg is used as a true vector launch image on iOS — one file, sharp on every device, instead of a folder of PNG variants.

Installation

Then rebuild — native code only compiles in at build time:

Alongside other splash plugins

Only run one. This plugin edits MainActivity.kt by exact-string match, as every splash plugin for NativePHP does — including s2br/nativephp-mobile-splashscreen, which anchors on the same two lines. Hook order between plugins is undefined, so with both registered the second to run finds source the first has already rewritten. This plugin then reports MainActivity.kt does not match the expected source and leaves the splash untouched rather than applying half of it — but the other plugin makes no such promise.

Configuration

Set the .env keys, or publish the config to edit it directly:

Key .env Values
ios.mode ENHANCED_SPLASH_IOS_MODE image (default), icon
ios.background ENHANCED_SPLASH_IOS_BACKGROUND #RRGGBB / #RRGGBBAA (default #FFFFFF)
ios.background_dark ENHANCED_SPLASH_IOS_BACKGROUND_DARK #RRGGBB / #RRGGBBAA (default #000000)
ios.icon_size ENHANCED_SPLASH_IOS_ICON_SIZE points (default 160)
ios.icon_rounded ENHANCED_SPLASH_IOS_ICON_ROUNDED bool (default true)
ios.icon_shadow ENHANCED_SPLASH_IOS_ICON_SHADOW bool (default false)
android.mode ENHANCED_SPLASH_ANDROID_MODE image (default), icon
android.background ENHANCED_SPLASH_ANDROID_BACKGROUND #RRGGBB / #RRGGBBAA (default #000000)
android.background_dark ENHANCED_SPLASH_ANDROID_BACKGROUND_DARK #RRGGBB / #RRGGBBAA (default #000000)

Colors are authored in CSS channel order throughout; the alpha byte is converted to each platform's own ordering at build time.

# starts a comment in .env, so quote hex values there:

Defaults match NativePHP's own behavior, so installing the plugin changes nothing until you configure it.

Android modes

icon: just one native splash instead of two

The system splash is held on screen until your app is ready, and the overlay never draws. Your launcher icon on background, then straight into your app. No second phase, nothing to time.

This mode ignores splash.png — the system splash draws your launcher icon, not your artwork. Pick it when your splash is a logo on a flat color anyway, and image when the artwork matters.

image: keep the default splash image, but influence the default splash color

Your splash.png still fills the screen. background and background_dark repaint everything around and before it — the system splash, the app window, and the overlay your image fades into. This will make the transitions less jarring if your app and splash.png use different background colors.

One thing to know: this color is also the app window's background afterwards, so it shows through any frame your UI hasn't painted yet. Keep it in the same family as your app's own surface color.

iOS modes

splash-ios-icon

icon: a launch screen without a designer

Set ios.mode = 'icon' and the plugin builds the launch screen from AppIcon.appiconset: your icon, masked to the iOS squircle so it matches the home screen, centered on background / background_dark. Both of iOS's launch phases get the same image, so there is no flicker between them.

Tuning:

If no app icon is present, the launch screen is NativePHP's own.

image: added SVG (vector) support

Drop public/splash.svg (and optionally public/splash-dark.svg) in place and it becomes the launch image, kept as a vector so it's sharp at every size. Without an SVG, the PNG variants are used as usual.

Note that splash.svg applies to image mode only — icon mode always draws the app icon.

Uninstall

native:install regenerates the native project from NativePHP's own sources, clearing everything the plugin changed.

You don't need this to change settings — edit the config and rebuild. Every build starts by undoing the previous one, so switching modes or colors is just another native:run.

License

MIT. See LICENSE.


All versions of nativephp-enhanced-splash with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
nativephp/mobile Version ^4.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package unloc/nativephp-enhanced-splash contains the following files

Loading the files please wait ...