Where would you place your SQLite database file in an iPhone app?

后端 未结 2 2022
野的像风
野的像风 2020-11-29 16:52

When I initially create an SQLite database file with pre-inserted datasets for my application, I would have to place this file somewhere in my Xcode project so that it goes

2条回答
  •  一向
    一向 (楼主)
    2020-11-29 17:24

    If you're just going to be querying for data, you should be able to leave it in the main bundle.

    This, however, is probably not a good practice. If you were to extend your application in the future to allow for database writing, you'd have to figure everything out again...

提交回复
热议问题