2

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?

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks Setanta I will deffinatly give that a shot. Now if i was to Create a new CoreData app that includes everything from the start. would i be able to Import everything i have already done on the app i am working on or would i have to rebuild it all?
While CoreData is nice, there's nothing wrong with using SQLite directly. I for one find that in certain scenarios it's actually easier to use SQLite.
@DarkDust: Agreed on both counts - especially when you have to access pre-existing SQLite databases - but for general use CoreData is Apple's recommended way to go and if you're trying to learn the best way to store user data - that's the way I'd go.
@Shaun: Having said the above - if you already have a lot of code written as you work through the book you're probably better off going with SQLite directly to keep things straight - then maybe when you have a good handle on things, go back and convert it to use CoreData as an exercise. Much of what you do directly in SQLite will translate across and it's useful to understand the underlying architecture of CoreData.
thanks i will keep both options in mind. I may actually do 2 different apps. 1 with core data and one using SQlite so i can try and get a handle on both.
2

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).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.