SQLite Tutorial - Add/Display/Delete - Xcode 4.5

iffytheperfect1983 · 55K views · 2012 · 49:40

Open on YouTube

Databases & storageSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a step-by-step iOS SQLite tutorial, both in answers about how to persist app data and in questions from people following it who get stuck.

Recommended by 1 people across 1 different months, 2013 to 2013.

What it is

A 50-minute screencast showing how to use an SQLite database in an iOS app built with Xcode 4.5. It builds a simple person example (first name and age) and covers adding, searching, displaying and deleting records. The presenter notes some background fan noise in the audio.

What people said

Recommends Patrick · 2013-02 · Stack Overflow · on “How to make app save data”

There are hundreds of tutorials - but you also need to consider which method is best for your app. For saving small simple amounts of data (such as user settings) use NSUserDefaults . For more complicated data you could use CoreData or SQLite. NSUserDefaults - NSUserDefaults - tutsplus.com [LINK] Core Data - Core Data - raywenderlich.com [LINK] SQLite - SQLite Tutorial - Add/Display/Delete - Xcode 4.5 - Youtube [this video] NSUserDefaults is as simple as: To set an object: NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:@"Patrick" forKey:@"username"]; [defaults synchronize]; To retrieve and object: NSUserDefaults *defaults = [NSUserDefaults standardUserDefaul

Cites chrisjr · 2013-08 · Stack Overflow · on “App not creating a sqlite database”

For some reason, my app doesn't seem to create a database in the Documents folder. I have been following this video tutorial ( [this video] ) (it also has the source code available ( [LINK] ) which I downloaded and it ran on the Simulator perfectly). I used a few NSLog statements to attempt to pinpoint the problem. I realized that while all of the code up to "Declared" statement ran with no problems, the rest of the NSLog statements didn't show up in the console. I have looked tirelessly back and forth between the code I wrote and the code in the tutorial but with no avail for a solution. Here is the code. @interface ViewController () { NSMutableArray *letterArray; sqlite3 *letterDB; NSString *db

Cites Saad Chaudhry · 2013-09 · Stack Overflow · on “Why there is no database file created and no operation is being done in Core Data?”

i am new to ios. I am trying to learn ios but till now i am not successful to do a CRUD in ios. i was following a tutorial and there is no issue in code as well you will see code below. i take an empty application with core data and ARC. the make a an entity named Person (popular tutorial Example : [this video] ) then added sub class of NSObject named IMSPerson . then added sub class of UIVIEWCONTROLLER . then make an insertion method on btnSavePerson. The main problem is that i have no CORE DATA db file which tell me the data is being inserted... - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (_persistentStoreCoordinator != nil) { return _persistentStoreCoordinator; } NSURL *s

Cites Tommie C. · 2013-10 · Stack Overflow · on “How to import an .sqlite3/.sqlite file to ios application?”

Update Please note the updated response. Is there any way to import it (SQLite) into an ios app and manipulate the data? You can import a sqlite file into Xcode, by simply adding it as a resource using Add New File... However you would have limited ability to use it jointly with Core Data (unless it was created with Core Data). One can review the objc.io article [LINK] referenced earlier that covers how to deal with prepopulated data in an Xcode project. Here is the pertinent section of that article. NSFileManager* fileManager = [NSFileManager defaultManager]; NSError *error; if([fileManager fileExistsAtPath:self.storeURL.path]) { NSURL *storeDirectory = [self.storeURL URLByDeletingLastPathC