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. forEach循环dom元素

    //让ie8支持foreach if (typeof Array.prototype.forEach != 'function') { Array.prototype.forEach = functi ...

  2. UVALIVE 3972 March of the Penguins

    最大流建图比较容易第一次Dicnc抄了下别人的版 存一下以后方便查 #include <map> #include <set> #include <list> #i ...

  3. python搭建区块链

    #!/usr/bin/env python # encoding: utf-8 ''' 我们要创建一个 Blockchain 类 ,他的构造函数创建了一个初始化的空列表(要存储我们的区块链),并且另一 ...

  4. (4) python--seaborn

    seaborn封装了matplotlib的一些风格,简单的介绍一下

  5. Selenium2+python自动化19-单选框和复选框(radiobox、checkbox)【转载】

    本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...

  6. python接口自动化4-绕过验证码登录(cookie)【转载】

    本篇转自博客:上海-悠悠 原文地址:http://www.cnblogs.com/yoyoketang/tag/python%E6%8E%A5%E5%8F%A3%E8%87%AA%E5%8A%A8%E ...

  7. PHP使用AJax轮询实现新订单实时提醒

    业务逻辑:Ajax每隔10秒钟请求一次接口,该接口会去查询数据库是否有新的订单,如果有则返回新订单的数量,后台收到声音提示,更改后台提醒数量 提醒框可链接到订单列表,后台更改完订单状态后会提醒会消失 ...

  8. Android应用开发之使用Socket进行大文件断点上传续传

    http://www.linuxidc.com/Linux/2012-03/55567.htm http://blog.csdn.net/shimiso/article/details/8529633 ...

  9. .ner core InvalidOperationException: Cannot find compilation library location for package 'xxx' 和 SqlException: 'OFFSET' 附近有语法错误。 在 FETCH 语句中选项 NEXT 的用法无效。问题

    原文地址:传送门 1.InvalidOperationException: Cannot find compilation library location for package 'xxx'问题: ...

  10. (2)apache安装、配置及使用

    一.apache安装 假设我们我们的安装路径是 C:\Apache2.2 运行软件 如果是本地学习使用 第二行服务名localhost 其他随便 一个自动安装,一个自定义安装,没有什么特别重要的,一直 ...