将 sqlite3 添加到框架中?
我正在阅读《Wrox Beginning IOS 4 Application Development》这本书,尝试弄清楚如何使用 sqlite3 保存用户数据。
在这个练习中,它告诉我启动一个新的“基于视图的应用程序”。我这样做,然后它说“右键单击”“Frameworks”文件夹并将“libsqlite3.dylib”库添加到其中。
好吧,我不知道如何添加该库。我下载了这本书的源代码,认为它可能在那里,但事实并非如此。所以我假设它是 xcode 中内置的东西,但我不知道如何添加这个东西。
谁能引导我走向正确的方向,以便我可以尝试开始本章?
Im reading in this book "Wrox Beginning IOS 4 Application Development" to try n figure out how to be able to save user data using sqlite3.
In this exercise it is telling me to start a new "view based Application". I do that and then it says to "Right Click" the "Frameworks" folder and add the "libsqlite3.dylib" Library to it.
Well i cant figure out how to add that library. I downloaded the source code for this book thinkin it might be in there and its not. So im assuming it is something built in to xcode but i cant figure out how to add this thing.
Can anyone lead me in the right direction so i can try and get started on this chapter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
虽然您当然可以直接使用 SQLite,但现在强烈建议您使用 CoreData - 它由 SQLite 支持,但提供 Objective-C API。有大量关于如何使用 CoreData 的教程、文章和视频(查看 iTunes U - Stanley CS193P,了解 CoreData 的精彩介绍)。此外,当您创建新的 CoreData 应用程序时,它会自动包含您需要的所有内容。
While you can certainly use SQLite directly it's strongly recommended that you use CoreData instead these days - which is backed by SQLite but provides an Objective-C API. There are plenty of tutorials and articles and videos on how to use CoreData (check iTunes U - Stanford CS193P for an excellent introduction to CoreData). Also when you create a new CoreData application it automatically includes everything you need.
请参阅我对此相关问题的回答,了解如何执行此操作(请参阅第一个编辑;问题是关于添加 libresolv,但步骤是相同的)。
See my answer to this related question on how to do this (see the first Edit; the question was about adding libresolv but the steps are the same).