简体   繁体   English

提供带有内容的Core Data App的最佳实践?

[英]Best practice to deliver Core Data App with content?

Hey guys, 大家好,
what would you say is the best way to ship initial data with an Core Data iOS App? 您会说什么是用Core Data iOS App传送初始数据的最佳方法?

Is it maybe to once run the app, store the data and then insert the datafile in the build? 是否可以一次运行应用程序,存储数据然后将数据文件插入到构建中? There must be a better way.. 一定会有更好的办法..

I have had good experiences with loading the data into a sqlite backing in the simulator, and then bundling the resulting sqlite file with the app. 我在将数据加载到模拟器中的sqlite支持中,然后将所得的sqlite文件与该应用程序捆绑在一起方面有很好的经验。

Especially for bigger datasets, first-run filling of the database is not really an option. 特别是对于较大的数据集,第一次运行数据库填充并不是真正的选择。

I've been toying around with the same problem myself, recently; 最近,我本人一直在处理相同的问题; and what I opted for was to store the data in the app in some easily parsable (for me) format, and parse and incorporate it on first run. 我选择的是以一种易于解析的格式(对我来说)将数据存储在应用程序中,并在首次运行时进行解析和合并。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM