Creating .sqlite file from Core Data store?

前端 未结 2 1177
执笔经年
执笔经年 2021-02-09 11:36

I\'ve seen tutorials in books and on websites that offer .sqlite files for download. The sqlite files are used for Core Data.

How do I get a .sqlite file FROM

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-09 11:51

    If you are going to create a pre-populated sqlite file to be used with Core Data then you must create it with Core Data. It is trivial to create a basic desktop application for data entry and use that to create the file and then embed it in your iOS device.

    Do not attempt to duplicate the data structure or linkage within the file by hand. You might get it to work but you will spend way more time trying to get it to work and it is going to eventually fail. The internal structure of a Core Data sqlite file should be considered like a private API. The structure is not public and can change without notice.

提交回复
热议问题