Android displays a splash screen for PWAs based on the icons and names you provide, but iOS just displays a solid color splash screen for installed PWAs by default.

We'll make a new splash screen image for every iOS device resolution size that we want to support, and then we can make a link tag in index.html to specify those images as the splash screen for each device resolution.

Also, make sure to remove background_color from the manifest - or it may overwrite the splash screen images on iOS.

For Splash screen, it use 512*512 image for Andorid.

For IOS we need to add image for splash screen, no other way around currently.

First, we must tell iOS that the app is apple-mobile-web-app-capable with a meta tag.

<meta name="apple-mobile-web-app-capable" content="yes">

Then we can specify each of those launch images as the image for that resolution.

<link rel="apple-touch-startup-image" href="splash_640x1136.jpg" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="splash_750x1334.jpg" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="splash_1242x2208.jpg" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="splash_1125x2436.jpg" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="splash_1536x2048.jpg" media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="splash_1668x2224.jpg" media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="splash_2048x2732.jpg" media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">

Finally, in manifest.json, we have to actually remove the "background_color" setting first. Otherwise, that will override all of our images.

												

[PWA] Customize the Splash Screen of a PWA built with create-react-app的更多相关文章

  1. Customize Netbeans Platform Splash Screen and About Dialog

    原帖一直打不开,通过谷歌翻译找到的 http://blogs.kiyut.com/tonny/2007/10/18/customize-netbeans-platform-splash-screen- ...

  2. Flutter - 给App增加启动屏幕(Splash Screen)并且设置背景颜色

    先看一下效果图,启动图最好设置为png格式的透明图,以防图片填充不满的时候背景图会非常的煞白(Flutter 默认背景色是白色). 打开android\app\src\main\res\drawabl ...

  3. Xamarin Android -创建Splash Screen (一)

    ......(空话少说) Xamarin 开发的技术资料很少,通过学习,把自己的学习过程及其中碰到的问题与大家分享. Splash Screen 就是在应用程序启动时,出现的一张图片,一般App的Sp ...

  4. CREATE A LOADING SCENE / SPLASH SCREEN - UNITY

    In the first scene or maybe the Main Menu scene of your game Create an Empty Gameobject. Call it wha ...

  5. iphone dev 入门实例7:How to Add Splash Screen in Your iOS App

    http://www.appcoda.com/how-to-add-splash-screen-in-your-ios-app/ What’s Splash Screen? For those who ...

  6. Splash Screen开场屏在Android中的实现

    很多网友可能发现近期Tencent推出的手机QQ Android版包含了一个开场屏Splash Screen载入效果,通常游戏或大型软件打开时可能需要一个释放解析资源的过程,需要一个前台的动画播放和后 ...

  7. 实现在Android开发中的Splash Screen开场屏的效果

    很多网友可能发现近期Tencent推出的手机QQ Android版包含了一个开场屏Splash Screen载入效果,通常游戏或大型软件打开时可能需要一个释放解析资源的过程,需要一个前台的动画播放和后 ...

  8. Windows Phone Splash Screen

    Why to use splash screen? Typically, you should use a splash screen in your app only if your app is ...

  9. 第十八章:自定义splash screen、app icon和tab icon

    本文介绍如何自定义splash screen.app icon和tab icon. 1. 自定义splash screen和app icon 1.1 产生resources文件夹,启动命令行: ion ...

随机推荐

  1. COM RTS/CTS, DTR/DSR

    COM: 串行通讯端口cluster communication port它是串行接口,现在的PC 机一般有两个串行口COM 1 和COM 2 .串行口不同于并行口之处在于它的数据和控制信息是一位接一 ...

  2. Linux下kill命令

    首先了解什么是信号:信号是进程级的中断请求,系统定义了30余种信号,kill是管理员用来发送信号的一种手段. 功能说明:删除执行中的程序或工作. 语 法:kill [-s <信息名称或编号> ...

  3. [poj_3469]多核CPU

    Sample Input 3 1 1 10 2 10 10 3 2 3 1000 Sample Output 13 最小割,把模块看做点,建源点s和汇点t,以下(a,b,c)表示从a向b连一条容量为c ...

  4. linux中高端内存和低端内存的概念【转】

    转自:http://blog.csdn.net/hdujinhuihui/article/details/8686817 高端内存是Linux中一个重要的概念,初涉Linux时曾经对这个概念非常迷惑. ...

  5. ftp服务器搭建(windows)+实现ftp图片上传对接

    ftp服务器搭建(windows): vsftpd简介: vsftpd是“very secure FTP daemon”的缩写,是一个完全免费的.开放源代码的ftp服务器软件. 下载地址: http: ...

  6. 阿里云Ubuntu快速建站

    阿里云Ubuntu快速建站 有一个小笑话: 从前有个程序员遇到了一个问题.他想,没事,我懂,用线程就好了.现他有两个问题了. 本人小白,对网站部署什么都不懂,只是申请个阿里云服务器,把我的站点放上去. ...

  7. gitlib 安装

    参考文件https://www.cnblogs.com/rslai/p/9109624.html

  8. Reporting Services的简单使用

    最近公司的功能需要使用报表,用的是微软自带的报表,谈一谈我们的做法,希望可以给想学习的人一些指导 1:新建報表所需的數據源DataSet.cs using System; using System.C ...

  9. Guava源码学习(三)ImmutableCollection

    基于版本:Guava 22.0 Wiki:Immutable collections 0. ImmutableCollection简介 类似于JDK的Collections.unmodifiableX ...

  10. 牛客网练习赛18 A 【数论/整数划分得到乘积最大/快速乘】

    链接:https://www.nowcoder.com/acm/contest/110/A 来源:牛客网 题目描述 这题要你回答T个询问,给你一个正整数S,若有若干个正整数的和为S,则这若干的数的乘积 ...