作者:大美女慧慧慧 | 来源:互联网 | 2023-01-26 19:50
IcurrentlyhaveaniPhoneappthatreadsdatafromanexternalXMLfileatstart-up,andthenwrite
I currently have an iPhone app that reads data from an external XML file at start-up, and then writes this data to the database (it only reads/writes data that the user's app has not seen before, though)
我目前有一个iPhone应用程序,它在启动时从外部XML文件中读取数据,然后将数据写入数据库(它只读取/写入用户应用程序以前从未见过的数据)
My concern is that there is going to be a back catalogue of data of several years, and that the first time the user runs the app it will have to read this in and be atrociously slow.
我担心的是,将会有一份几年的数据备份目录,而且用户第一次运行这个应用程序时,必须阅读它,而且速度非常慢。
Our proposed solution is to include this data "pre-built" into the applications database, so that it doesn't have to load in the archival data on first-load - that is already in the app when they purchase it.
我们提出的解决方案是将这些“预构建”的数据包含到应用程序数据库中,这样它就不必在第一次加载时加载应用程序中已经存在的存档数据。
My question is whether there is a way to automatically populate this data with data from, say, an XML file or something. The database is in SQLite. I would populate it by hand, but obviously this will take a very long time, so I was just wondering if anybody had a more...programmatic solution...
我的问题是,是否有一种方法可以用XML文件或其他东西的数据自动填充数据。数据库在SQLite中。我用手填充它,但显然这需要很长时间,所以我想知道是否有人有更多…编程解决方案…
3 个解决方案