IOS和脱机存储上的PWA [英] PWA on IOS and offline storage

查看:57
本文介绍了IOS和脱机存储上的PWA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望开发一个应用程序",该应用程序能够为评估人员记录损坏的汽车的详细信息.这个想法是,少数评估者会拥有公司的iPad.然后,当汽车损坏并返回到院子时,他们可以访问拍照,输入一些详细信息,然后将其上传到主系统中.一些车场可能在没有Internet覆盖的区域,因此需要离线功能.

We looking to develop an "App" which would have the ability to record the details of a damaged car for assessors. The idea is that a small number of assessors would have company iPads. Then when car is damaged and returned to the car yard they can visit take photos, enter some details and then upload them into the main system later. Some of the car yards may be in areas that do not have internet coverage, so offline capability is required.

我们最初的想法是开发一个可安装在少量公司iPad上的IOS App.该应用程序可以访问相机拍照,然后在设备可以访问互联网时将照片上传到主系统.但是,对于客户而言,此解决方案可能会被证明过于昂贵(相对于开发成本).

Our initial thoughts were to develop an IOS App for installation on a small number of company iPads. The App could access the camera to take photos and then when the device has internet access upload the photos to the main system. However this solution could prove too costly (regarding development costs) for the customer.

我已经阅读了有关PWA和缓存数据的信息,但是该缓存似乎是针对脱机读取访问的.

I have read about PWAs and caching data, but the caching seems to be for offline read access.

如果我们在iPad上安装了chrome,然后又安装了PWA,则可能是

If we installed chrome on an iPad and then installed a PWA then presumably

  1. PWA是否可以存储高达128GB * 6%= 7.68GB的图片?
  2. 如果使用文件系统API进行存储,那么(只要有足够的存储空间系统上的空间)数据将被保留(我的理解是没有时间限制)?还是其他类型的存储更合适.
  3. 离线数据显然很重要(法庭上可能需要),因此关于持久性和安全性还有其他问题吗?将图像上传到主系统之前是否稳定?

请注意,我们宁愿使用iPad(因为客户更喜欢iPad),但我们可以考虑使用其他平台.

Note we would prefer to use iPads (as the customer would prefer these) but we could consider other platforms.

在这个阶段,我真的在试图找出PWA访问离线存储在平台上是否可行,实用和稳定?

At this stage I am really trying to find out if a PWA accessing the offline storage is likely to be feasible, practical and stable on the platform?

推荐答案

首先,iOS限制第三方网络浏览器(或显示网页的任何应用)使用其自己的引擎-在iPad上安装Chrome将无法访问所有不支持iOS/Safari的Web API.

Firstly, iOS restricts third party web browsers (or any app that displays web pages) to using its own engine - installing Chrome on an iPad will not enable access to any web APIs that iOS/Safari doesn't already support.

特别是:

  • 文件系统API在iOS上不可用,即使您使用的是Chrome
  • 每个网站的缓存API的存储限制为50MB
  • IndexedDB每个网站的存储限制为500MB或设备可用空间的一半(以较小者为准)
  • 如果几个星期不使用PWA及其缓存的数据,则会自动从设备中擦除
  • 即使您使用的是Chrome或Firefox,iOS上也不支持用于要求持久数据的"navigator.storage" API.

这篇关于IOS和脱机存储上的PWA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆