![](/img/trans.png)
[英]How can I download USDZ models from Firebase Storage and load them into ARQuickLook on my iOS app?
[英]How can I limit the storage I give each user on an iOS(swift)/Firebase app?
我正在制作一个照片库应用程序,并希望用户拥有 2GB 的存储空间,然后为更多的存储空间付费
我已经完成了相当多的应用程序,但我在如何分配 2GB 和允许用户解锁额外空间的方法上遇到了困难
如果有人能给出基本的指导那就太好了
解决方法:您应该有一个变量名称,例如:“used_storage”,将其保存在您想要的任何位置。 (不要让用户容易改变它)
max_storage = 2 * 2^20
当您将大小为 x KB 的图库保存到应用程序文档文件夹时:
if used_storage + x < max_storage {
used_storage += x
// update used_storage
// save your image
} else {
// alert to user that they used to much and must charge for more space ...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.