How can I ship my app with a pre-populated Core Data database?

后端 未结 5 1474
天涯浪人
天涯浪人 2021-02-01 08:16

My app uses Core Data and I want some default entries to be inside. What\'s best practices of how to do that?

5条回答
  •  名媛妹妹
    2021-02-01 08:28

    There is Core Data Editor at the app store. Alternatively you could build your own simple mac app just for this particular DB and manage it from there. If the amount of default entries is small, then you're better off storing it in a plist or something and loading it into DB after the first launch.

提交回复
热议问题