UIPasteboard尺寸 [英] UIPasteboard size
问题描述
自iOS4 +起,这不再相关-请停止投票!或至少说明您的不赞成票
我正在尝试为从精简版到完整版应用程序的升级做准备,该应用程序可以存储无限量的数据(我不想在购买应用程序时进行此操作).
I am trying to do an upgrade path for a lite to full version of an application, that can store an indefinite amount of data (I dont want to do in app purchase).
我希望能够使用自定义网址进行升级,而无需在线状态来将数据缓存到其中.
I would like to be able to upgrade using a custom url without needing an online presence to cache the data to.
因此正在考虑使用UIPasteboard对象.
So was thinking of using a UIPasteboard object.
有人知道或对存储在UIPasteboard上的数据的最大可能大小进行过调查吗?关于此,我似乎没有苹果的文档.
Does anyone know, or done any investigations on the max possible size of data stored to a UIPasteboard? There seems to be no apple documentation, that i can find, regarding this.
这会因设备而异吗?即RAM受限制吗?
Will this vary from device to device? i.e. is it RAM limited?
我尝试了一个50MB的文件,尽管5 MB的文件还可以,但是知道这失败了(即使在模拟器中).在您使用dataForPasteboardType获取数据之前,无法知道它是否失败:
I tried a 50MB file and know this fails (even in simulator) though a 5 MB file is OK. There is no way of knowing if it has failed until you come to get the data with dataForPasteboardType:
还有,有没有人做过2个应用程序自定义URL,这些URL将执行一种请求/响应应用程序间通信?我当时以为我可以通过这种方式支持任意大小的数据...
Also, has anyone done 2 app custom URLs that will do a kind of request/response inter app comms? I was thinking that i could support arbitrary sized data this way...
推荐答案
经过一些调查,我将回答我自己的问题,它是8MB.设备无关.
I'll answer my own question, after doing some investigation, it's 8MB. Device independent.
我还设法使用2个自定义URL和openURL方法在应用程序之间递归地支持任意数量的数据升级.经过测试,最高可达100MB-看起来并不漂亮,因为它可以打开每个应用程序12次!
I have also managed to support upgrade of arbitrarily large amounts of data using 2 custom URLs and the openURL method recursively between apps. Tested up to 100MB - it doesn't look too pretty because it opens each app 12 times!
这篇关于UIPasteboard尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!