You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin displays and hides a splash screen while your web application is launching. Using its methods you can also show and hide the splash screen manually.
29
29
@@ -36,29 +36,17 @@ This plugin displays and hides a splash screen while your web application is lau
If using `[email protected]` or later and exclusively developing for Android, this plugin can be uninstalled.
78
-
- iOS
79
-
__Note__: iOS implementation has been moved to the core framework.
80
-
If using `cordova-ios@5` or earlier, use `cordova-plugin-splashscreen@5`
81
-
If using `cordova-ios@6` or later, use `cordova-plugin-splashscreen@6`. If developing exclusively for the iOS platform, this plugin can be uninstalled.
82
66
- Windows (`cordova-windows` version >= 4.4.0 is required)
83
-
__Note__: Extended splashscreen does not require the plugin on Windows (as opposed to Android and iOS) in case you don't use the plugin API, i.e. programmatic hide/show.
67
+
__Note__: Extended splashscreen does not require the plugin on Windows (as opposed to Android) in case you don't use the plugin API, i.e. programmatic hide/show.
@@ -239,180 +210,6 @@ For more examples, please see [the Example Configuration](#example-android-confi
239
210
</platform>
240
211
```
241
212
242
-
### iOS-specific Information
243
-
244
-
Launch storyboard images are sized based on scale, idiom, and size classes. It supports all devices, and can be used with split-screen/slide-over multitasking.
245
-
246
-
There is no official support for providing a native-resolution launch image for the iPad Pro 12.9 or for providing launch images that work with split-screen multitasking or slide-over.
247
-
248
-
**Note:** Since iOS 11, for iPhone X devices and greater (with notch screen), make sure to add `viewport-fit=cover` to the viewport meta tag in your `index.html` file to display the app correctly like so: `<meta name="viewport" content="user-scalable=no, initial-scale=1, width=device-width, viewport-fit=cover">` and make some modification to your app style by adding: `padding: env(safe-area-inset-top)` to your `index.css` file to avoid the unsafe areas behind notches in the screen.
249
-
250
-
#### Launch Storyboard Images
251
-
252
-
To support newer form factors and split-screen/slide-over multitasking, launch storyboard images are used.
253
-
254
-
- images are not specific to a given device.
255
-
- images are scaled to fill the available viewport (while maintaining the aspect ratio).
256
-
- the outer edges of the images will be cropped, and the amount will vary based on device an viewport.
257
-
- there is no need to provide an image for each possible device, viewport, and orientation; iOS will choose the best image for the situation automatically.
258
-
259
-
##### Designing Launch Storyboard Images
260
-
261
-
The key to designing a launch storyboard image is understanding that the edges of the image will almost certainly be cropped. Therefore, one should not place any important information near the edges of any images provided to the launch storyboard. Only the center is a safe area, and this all but guarantees that following Apple's advice of presenting an unpopulated user interface will not work well.
262
-
263
-
Instead, the following tips should enable you to create a launch image that works across a multitude of form factors, viewports, and orientations:
264
-
265
-
- Important graphics (logos, icons, titles) should be centered. The safe bounding region will vary, so you will need to test to ensure that the important graphics are never cropped. Better yet, don't supply any important graphics in the first place.
266
-
267
-
- You _can_ fine-tune the placement and size of these graphics.
268
-
269
-
- Use a simple color wash. If you use two colors, you'll want one color to fill the top half of the image, and the second to fill the bottom half. If you use a gradient, you'll probably want to ensure that the middle of the gradient lines up with the center of the image.
270
-
271
-
- Don't worry about pixel perfection -- because the images are scaled, there's almost no chance the images will be perfectly fit to the pixel grid. Since all supported iOS devices use retina screens, users will be hard pressed to notice it anyway.
272
-
273
-
It is important to understand the concept of scale, idiom, and size class traits in order to use launch storyboard images effectively. Of the images supplied to the launch storyboard, iOS will choose the image that best matches the device and viewport and render that image. It is possible to supply only one launch image if so desired, but it is also possible to fine-tune the displayed launch image based on traits. When fine-tuning, one can ignore traits that aren't targeted or supported by the app.
274
-
275
-
##### Scale
276
-
277
-
| scale | devices |
278
-
|:-----------:|:----------------------:|
279
-
| 1x | All non-retina devices |
280
-
| 2x | Most retina devices |
281
-
| 3x | iPhone 6+/6s+,7s+ |
282
-
283
-
In general, you'll want to supply 2x and 3x images. Cordova only supports retina devices now, so there's no point in supplying 1x images.
284
-
285
-
##### Idioms
286
-
287
-
| idiom | devices |
288
-
|:-----------:|:-------------:|
289
-
| ipad | All iPads |
290
-
| iphone | All iPhones and iPod Touches |
291
-
| universal | All devices |
292
-
293
-
You only need to provide universal images unless you need to fine-tune for a specific device idiom.
294
-
295
-
##### Size classes
296
-
297
-
There are two size classes applies to both screen axes. Narrow viewports are considered to be the "compact" size class, and remaining viewports are considered "regular". When supplying images to Xcode, however, one must choose between "any & compact" and "any & regular". To stay consistent with the native terminology, this feature will match based on "any" and "compact". `any` will match regular-sized viewports.
298
-
299
-
Note: this feature uses `com` as an abbreviation for "compact" classes.
300
-
301
-
The following classes are supported by this feature:
To see the complete list of size classes associated with devices and viewports, see <http://www.sizeclasses.com>.
311
-
312
-
##### Single-image launch screen
313
-
314
-
If your launch image is simple, you may be able to avoid creating a lot of different launch images and supply only one. The launch image needs to meet the following requirements:
315
-
316
-
- the image should be square
317
-
- the image should be large enough to fit on an iPad Pro 12.9": 2732x2732
318
-
- anything important should fit within the center
319
-
320
-
Keep in mind that the image will be cropped, possibly quite severely, depending upon the viewport.
321
-
322
-
Once the image is created, you can include it in your project by adding the following to `config.xml`:
Because only one image is provided, iOS will utilize it in every context.
329
-
330
-
##### Multi-image launch screen
331
-
332
-
If a single launch image won't meet your needs, you will probably need to supply at least six images, if not more. Furthermore, keep in mind that it will not be possible to fine tune the image to a specific device, but only to a device class, display factor, and viewport size.
333
-
334
-
If you don't need to target images to a specific idiom, you should create six images, as follows:
Since [[email protected]](https://github.com/apache/cordova-ios), it is now possible to optionally specify different SplashScreen images to use when the app is running in dark mode. The luminosity of SplashScreen images can be defined in `config.xml` using the `~dark` and `~light` suffixes.
**Note:** This works since iOS 13. iOS 12 and below will use the default SplashScreen without a luminosity suffix specified.
404
-
405
-
##### Quirks and Known Issues
406
-
407
-
1.**App on target may not reflect changes to images**
408
-
Once you run the app on a target, iOS caches the launch image. Unfortunately, when you change the image, iOS does _not_ invalidate the cache, which means you'll still see the old launch image. You should either: delete the app, or reset content & settings (simulator).
409
-
410
-
2.**Simulator may not show expected images when launched from CLI**
411
-
When Xcode deploys to a specific simulator, it only copies the assets that match the simulator's characteristics. For example, if you try to run an app on the iPhone 6s Plus simulator, only @3x launch images are copied. When compiling from the CLI, however, the default is to assume an iPhone 5s, which means only @2x launch images are copied. Unless your launch images are markedly different, chances are good the difference would go unnoticed, but this does mean that the only accurate method of testing is to test on a physical device.
412
-
413
-
3.**`anyany` must be provided for other variations to be used**
414
-
If you don't provide an `anyany` version of the launch image for a specific scale and idiom, the other variations (like `anycom`, `comany`, and `comcom`) will ignored.
415
-
416
213
### Windows-specific Information
417
214
418
215
Splash screen images can be defined using the [MRT](https://cordova.apache.org/docs/en/dev/config_ref/images.html#windows) concept.
@@ -464,8 +261,6 @@ __Note__: You may need to reopen Visual Studio solution after changing the image
464
261
**Windows Quirk**: You should disable the splashscreen in case you are updating the entire document body dynamically (f.e. with a SPA router) to avoid affecting UI/controls.
465
262
Note that you should also directly reference `WinJS/base.js` in the page HTML in this case to avoid the issues with activation context ([CB-11658](https://issues.apache.org/jira/browse/CB-11658)).
466
263
467
-
**iOS Quirk**: to disable the splashscreen on `ios` platform you should also add `<preferencename="FadeSplashScreenDuration"value="0"/>` to `config.xml`.
468
-
469
264
- `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to
470
265
prevent the splash screen from fading in and out when its display
471
266
state changes.
@@ -545,10 +340,6 @@ You can use the following preferences in your `config.xml`:
545
340
546
341
__Note__: `SplashScreen` value should be absolute in order to work in a sub-page. The `SplashScreen` value is used only for the browser platform. The value will be ignored for other platforms.
547
342
548
-
#### iOS Quirks
549
-
550
-
- In iOS, the splash screen images are called launch images. These images are mandatory on iOS.
551
-
552
343
#### Windows Quirks
553
344
554
345
-`SplashScreenSpinnerColor` (string, defaults to system accent color): hash, rgb notation or CSS color name.
@@ -578,19 +369,6 @@ Dismiss the splash screen.
578
369
navigator.splashscreen.hide();
579
370
```
580
371
581
-
582
-
#### iOS Quirk
583
-
584
-
The `config.xml` file's `AutoHideSplashScreen` setting must be
585
-
`false`. To delay hiding the splash screen for two seconds, add a
586
-
timer such as the following in the `deviceready` event handler:
0 commit comments