├── SQLiteManagerExample ├── SQLiteManagerExample_Prefix.pch ├── main.m ├── Classes │ ├── UntitledViewController.h │ ├── UntitledAppDelegate.h │ ├── UntitledViewController.m │ └── UntitledAppDelegate.m ├── SQLiteManagerExample-Info.plist ├── SQLiteManagerExample.xcodeproj │ ├── misato.pbxuser │ ├── project.pbxproj │ └── misato.mode1v3 ├── MainWindow.xib └── UntitledViewController.xib ├── SQLiteManager.h ├── README └── SQLiteManager.m /SQLiteManagerExample/SQLiteManagerExample_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Untitled' target in the 'Untitled' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /SQLiteManagerExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Untitled 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /SQLiteManagerExample/Classes/UntitledViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UntitledViewController.h 3 | // Untitled 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SQLiteManager.h" 11 | 12 | 13 | @interface UntitledViewController : UIViewController { 14 | 15 | SQLiteManager *dbManager; 16 | 17 | IBOutlet UITextView *textView; 18 | } 19 | 20 | @property (nonatomic, retain) IBOutlet UITextView *textView; 21 | 22 | - (IBAction) addTable; 23 | - (IBAction) addUser; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /SQLiteManagerExample/Classes/UntitledAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // UntitledAppDelegate.h 3 | // Untitled 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class UntitledViewController; 12 | 13 | @interface UntitledAppDelegate : NSObject { 14 | UIWindow *window; 15 | UntitledViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet UntitledViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /SQLiteManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SQLiteManager.h 3 | // collections 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "sqlite3.h" 11 | 12 | 13 | enum errorCodes { 14 | kDBNotExists, 15 | kDBFailAtOpen, 16 | kDBFailAtCreate, 17 | kDBErrorQuery, 18 | kDBFailAtClose 19 | }; 20 | 21 | @interface SQLiteManager : NSObject { 22 | 23 | sqlite3 *db; // The SQLite db reference 24 | NSString *databaseName; // The database name 25 | } 26 | 27 | - (id)initWithDatabaseNamed:(NSString *)name; 28 | 29 | // SQLite Operations 30 | - (NSError *) openDatabase; 31 | - (NSError *) doQuery:(NSString *)sql; 32 | - (NSError *)doUpdateQuery:(NSString *)sql withParams:(NSArray *)params; 33 | - (NSArray *) getRowsForQuery:(NSString *)sql; 34 | - (NSError *) closeDatabase; 35 | - (NSInteger)getLastInsertRowID; 36 | 37 | - (NSString *)getDatabaseDump; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /SQLiteManagerExample/SQLiteManagerExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | ************************* 2 | 3 | SQLITE MANAGER FOR IOS 4 | 5 | ************************* 6 | 7 | SQLiteManager is a simple Class "wrapper" to use SQLite3 within iOS SDK. 8 | It provides methods to: 9 | - connect/create a database in your documents app folder 10 | - do a simple query 11 | - get rows in NSDictionary format 12 | - close the connection 13 | - dump your data in sql dump format 14 | 15 | For the moment that's all ;) 16 | 17 | SQLiteManager is made by Ester Sanchez (aka misato) and it's free to use, modify and distribute. 18 | If you use it, don't forget to mention me as the original creator. 19 | 20 | Thanks and enjoy! 21 | 22 | ********************** 23 | 24 | INSTALLATION & USAGE 25 | 26 | ********************** 27 | 28 | Just drag the two classes into your project. Also you need to import SQLite3 framework. Go to frameworks-> add existing framework->libsql3.dylib 29 | 30 | To use an existing database, the full path is required: 31 | 32 | ```objc 33 | NSString *dbPath = [[NSBundle mainBundle] pathForResource:@"users" ofType:@"db"]; 34 | dbManager = [[SQLiteManager alloc] initWithDatabaseNamed:dbPath]; 35 | ``` 36 | 37 | The code is pretty self-explanatory so i hope you'll understand it. 38 | If you have any doubts, don't hesitate to contact me at esanchez [at] misato [dot] es 39 | 40 | You have also an usage example in SQLiteManagerExample directory. 41 | 42 | -------------------------------------------------------------------------------- /SQLiteManagerExample/Classes/UntitledViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UntitledViewController.m 3 | // Untitled 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import "UntitledViewController.h" 10 | 11 | @implementation UntitledViewController 12 | 13 | @synthesize textView; 14 | 15 | 16 | - (IBAction) addTable { 17 | NSError *error = [dbManager doQuery:@"CREATE TABLE IF NOT EXISTS users (id integer primary key autoincrement, user text, password text);"]; 18 | if (error != nil) { 19 | NSLog(@"Error: %@",[error localizedDescription]); 20 | } 21 | 22 | NSString *dump = [dbManager getDatabaseDump]; 23 | 24 | textView.text = dump; 25 | [textView setNeedsDisplay]; 26 | 27 | } 28 | 29 | - (IBAction) addUser { 30 | 31 | int user = arc4random() % 9999; 32 | int pass = arc4random() % 9999; 33 | 34 | 35 | NSString *sqlStr = [NSString stringWithFormat:@"insert into users (user, password) values ('%d','%d');",user, pass]; 36 | NSError *error = [dbManager doQuery:sqlStr]; 37 | if (error != nil) { 38 | NSLog(@"Error: %@",[error localizedDescription]); 39 | } 40 | 41 | NSString *dump = [dbManager getDatabaseDump]; 42 | 43 | textView.text = dump; 44 | [textView setNeedsDisplay]; 45 | } 46 | 47 | /* 48 | // The designated initializer. Override to perform setup that is required before the view is loaded. 49 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 50 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 51 | if (self) { 52 | // Custom initialization 53 | } 54 | return self; 55 | } 56 | */ 57 | 58 | /* 59 | // Implement loadView to create a view hierarchy programmatically, without using a nib. 60 | - (void)loadView { 61 | } 62 | */ 63 | 64 | 65 | 66 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 67 | - (void)viewDidLoad { 68 | [super viewDidLoad]; 69 | 70 | dbManager = [[SQLiteManager alloc] initWithDatabaseNamed:@"prueba.db"]; 71 | NSString *dump = [dbManager getDatabaseDump]; 72 | textView.text = dump; 73 | 74 | } 75 | 76 | 77 | 78 | /* 79 | // Override to allow orientations other than the default portrait orientation. 80 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 81 | // Return YES for supported orientations 82 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 83 | } 84 | */ 85 | 86 | - (void)didReceiveMemoryWarning { 87 | // Releases the view if it doesn't have a superview. 88 | [super didReceiveMemoryWarning]; 89 | 90 | // Release any cached data, images, etc that aren't in use. 91 | } 92 | 93 | - (void)viewDidUnload { 94 | // Release any retained subviews of the main view. 95 | // e.g. self.myOutlet = nil; 96 | } 97 | 98 | 99 | - (void)dealloc { 100 | [super dealloc]; 101 | [dbManager release]; 102 | [textView release]; 103 | } 104 | 105 | @end 106 | -------------------------------------------------------------------------------- /SQLiteManagerExample/Classes/UntitledAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // UntitledAppDelegate.m 3 | // Untitled 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import "UntitledAppDelegate.h" 10 | #import "UntitledViewController.h" 11 | 12 | @implementation UntitledAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [self.window addSubview:viewController.view]; 27 | [self.window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 36 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /SQLiteManagerExample/SQLiteManagerExample.xcodeproj/misato.pbxuser: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | 1D3623250D0F684500981E51 /* UntitledAppDelegate.m */ = { 4 | uiCtxt = { 5 | sepNavIntBoundsRect = "{{0, 0}, {1965, 1170}}"; 6 | sepNavSelRange = "{0, 0}"; 7 | sepNavVisRange = "{0, 711}"; 8 | }; 9 | }; 10 | 1D6058900D05DD3D006BFB54 /* SQLiteManagerExample */ = { 11 | activeExec = 0; 12 | executables = ( 13 | 68188674132943A000459EB0 /* SQLiteManagerExample */, 14 | ); 15 | }; 16 | 28D7ACF60DDB3853001CB0EB /* UntitledViewController.h */ = { 17 | uiCtxt = { 18 | sepNavIntBoundsRect = "{{0, 0}, {1011, 576}}"; 19 | sepNavSelRange = "{386, 44}"; 20 | sepNavVisRange = "{0, 438}"; 21 | }; 22 | }; 23 | 28D7ACF70DDB3853001CB0EB /* UntitledViewController.m */ = { 24 | uiCtxt = { 25 | sepNavIntBoundsRect = "{{0, 0}, {1013, 1391}}"; 26 | sepNavSelRange = "{857, 0}"; 27 | sepNavVisRange = "{227, 1145}"; 28 | }; 29 | }; 30 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 31 | activeBuildConfigurationName = Debug; 32 | activeExecutable = 68188674132943A000459EB0 /* SQLiteManagerExample */; 33 | activeTarget = 1D6058900D05DD3D006BFB54 /* SQLiteManagerExample */; 34 | addToTargets = ( 35 | 1D6058900D05DD3D006BFB54 /* SQLiteManagerExample */, 36 | ); 37 | breakpoints = ( 38 | 6867C42C132977F400064A1E /* SQLiteManager.m:143 */, 39 | ); 40 | codeSenseManager = 6818867D132943B300459EB0 /* Code sense */; 41 | executables = ( 42 | 68188674132943A000459EB0 /* SQLiteManagerExample */, 43 | ); 44 | perUserDictionary = { 45 | PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { 46 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 47 | PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; 48 | PBXFileTableDataSourceColumnWidthsKey = ( 49 | 22, 50 | 300, 51 | 721, 52 | ); 53 | PBXFileTableDataSourceColumnsKey = ( 54 | PBXExecutablesDataSource_ActiveFlagID, 55 | PBXExecutablesDataSource_NameID, 56 | PBXExecutablesDataSource_CommentsID, 57 | ); 58 | }; 59 | PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { 60 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 61 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 62 | PBXFileTableDataSourceColumnWidthsKey = ( 63 | 20, 64 | 833, 65 | 20, 66 | 48, 67 | 43, 68 | 43, 69 | 20, 70 | ); 71 | PBXFileTableDataSourceColumnsKey = ( 72 | PBXFileDataSource_FiletypeID, 73 | PBXFileDataSource_Filename_ColumnID, 74 | PBXFileDataSource_Built_ColumnID, 75 | PBXFileDataSource_ObjectSize_ColumnID, 76 | PBXFileDataSource_Errors_ColumnID, 77 | PBXFileDataSource_Warnings_ColumnID, 78 | PBXFileDataSource_Target_ColumnID, 79 | ); 80 | }; 81 | PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { 82 | PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; 83 | PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; 84 | PBXFileTableDataSourceColumnWidthsKey = ( 85 | 20, 86 | 793, 87 | 60, 88 | 20, 89 | 48.16259765625, 90 | 43, 91 | 43, 92 | ); 93 | PBXFileTableDataSourceColumnsKey = ( 94 | PBXFileDataSource_FiletypeID, 95 | PBXFileDataSource_Filename_ColumnID, 96 | PBXTargetDataSource_PrimaryAttribute, 97 | PBXFileDataSource_Built_ColumnID, 98 | PBXFileDataSource_ObjectSize_ColumnID, 99 | PBXFileDataSource_Errors_ColumnID, 100 | PBXFileDataSource_Warnings_ColumnID, 101 | ); 102 | }; 103 | PBXPerProjectTemplateStateSaveDate = 321489566; 104 | PBXWorkspaceStateSaveDate = 321489566; 105 | }; 106 | perUserProjectItems = { 107 | 6867C48A1329816700064A1E /* PBXTextBookmark */ = 6867C48A1329816700064A1E /* PBXTextBookmark */; 108 | 6867C4C01329840300064A1E /* PBXTextBookmark */ = 6867C4C01329840300064A1E /* PBXTextBookmark */; 109 | 6867C4D5132988D500064A1E /* PBXTextBookmark */ = 6867C4D5132988D500064A1E /* PBXTextBookmark */; 110 | 6867C4D813298A8800064A1E /* PBXTextBookmark */ = 6867C4D813298A8800064A1E /* PBXTextBookmark */; 111 | 68C71059132974F6004555F8 /* PBXTextBookmark */ = 68C71059132974F6004555F8 /* PBXTextBookmark */; 112 | 68D230FC13298AA4000E0B9B /* PBXTextBookmark */ = 68D230FC13298AA4000E0B9B /* PBXTextBookmark */; 113 | }; 114 | sourceControlManager = 6818867C132943B300459EB0 /* Source Control */; 115 | userBuildSettings = { 116 | }; 117 | }; 118 | 68188674132943A000459EB0 /* SQLiteManagerExample */ = { 119 | isa = PBXExecutable; 120 | activeArgIndices = ( 121 | ); 122 | argumentStrings = ( 123 | ); 124 | autoAttachOnCrash = 1; 125 | breakpointsEnabled = 0; 126 | configStateDict = { 127 | }; 128 | customDataFormattersEnabled = 1; 129 | dataTipCustomDataFormattersEnabled = 1; 130 | dataTipShowTypeColumn = 1; 131 | dataTipSortType = 0; 132 | debuggerPlugin = GDBDebugging; 133 | disassemblyDisplayState = 0; 134 | dylibVariantSuffix = ""; 135 | enableDebugStr = 1; 136 | environmentEntries = ( 137 | { 138 | active = YES; 139 | name = NSZombieEnabled; 140 | value = YES; 141 | }, 142 | ); 143 | executableSystemSymbolLevel = 0; 144 | executableUserSymbolLevel = 0; 145 | libgmallocEnabled = 0; 146 | name = SQLiteManagerExample; 147 | savedGlobals = { 148 | }; 149 | showTypeColumn = 0; 150 | sourceDirectories = ( 151 | ); 152 | variableFormatDictionary = { 153 | }; 154 | }; 155 | 68188679132943B300459EB0 /* SQLiteManager.h */ = { 156 | uiCtxt = { 157 | sepNavIntBoundsRect = "{{0, 0}, {1011, 576}}"; 158 | sepNavSelRange = "{600, 30}"; 159 | sepNavVisRange = "{0, 637}"; 160 | }; 161 | }; 162 | 6818867A132943B300459EB0 /* SQLiteManager.m */ = { 163 | uiCtxt = { 164 | sepNavIntBoundsRect = "{{0, 0}, {1195, 4875}}"; 165 | sepNavSelRange = "{5779, 0}"; 166 | sepNavVisRange = "{4982, 1274}"; 167 | }; 168 | }; 169 | 6818867C132943B300459EB0 /* Source Control */ = { 170 | isa = PBXSourceControlManager; 171 | fallbackIsa = XCSourceControlManager; 172 | isSCMEnabled = 0; 173 | scmConfiguration = { 174 | repositoryNamesForRoots = { 175 | "" = ""; 176 | }; 177 | }; 178 | }; 179 | 6818867D132943B300459EB0 /* Code sense */ = { 180 | isa = PBXCodeSenseManager; 181 | indexTemplatePath = ""; 182 | }; 183 | 6867C42C132977F400064A1E /* SQLiteManager.m:143 */ = { 184 | isa = PBXFileBreakpoint; 185 | actions = ( 186 | ); 187 | breakpointStyle = 0; 188 | continueAfterActions = 0; 189 | countType = 0; 190 | delayBeforeContinue = 0; 191 | fileReference = 6818867A132943B300459EB0 /* SQLiteManager.m */; 192 | functionName = "-getRowsForQuery:"; 193 | hitCount = 1; 194 | ignoreCount = 0; 195 | lineNumber = 143; 196 | location = Untitled; 197 | modificationTime = 321484825.73075; 198 | originalNumberOfMultipleMatches = 1; 199 | state = 1; 200 | }; 201 | 6867C48A1329816700064A1E /* PBXTextBookmark */ = { 202 | isa = PBXTextBookmark; 203 | fRef = 68188679132943B300459EB0 /* SQLiteManager.h */; 204 | name = "SQLiteManager.h: 35"; 205 | rLen = 30; 206 | rLoc = 600; 207 | rType = 0; 208 | vrLen = 637; 209 | vrLoc = 0; 210 | }; 211 | 6867C4C01329840300064A1E /* PBXTextBookmark */ = { 212 | isa = PBXTextBookmark; 213 | fRef = 28D7ACF60DDB3853001CB0EB /* UntitledViewController.h */; 214 | name = "UntitledViewController.h: 22"; 215 | rLen = 44; 216 | rLoc = 386; 217 | rType = 0; 218 | vrLen = 438; 219 | vrLoc = 0; 220 | }; 221 | 6867C4D5132988D500064A1E /* PBXTextBookmark */ = { 222 | isa = PBXTextBookmark; 223 | fRef = 28D7ACF70DDB3853001CB0EB /* UntitledViewController.m */; 224 | name = "UntitledViewController.m: 36"; 225 | rLen = 0; 226 | rLoc = 857; 227 | rType = 0; 228 | vrLen = 1145; 229 | vrLoc = 227; 230 | }; 231 | 6867C4D813298A8800064A1E /* PBXTextBookmark */ = { 232 | isa = PBXTextBookmark; 233 | fRef = 6818867A132943B300459EB0 /* SQLiteManager.m */; 234 | name = "SQLiteManager.m: 246"; 235 | rLen = 0; 236 | rLoc = 5779; 237 | rType = 0; 238 | vrLen = 1196; 239 | vrLoc = 5042; 240 | }; 241 | 68C71059132974F6004555F8 /* PBXTextBookmark */ = { 242 | isa = PBXTextBookmark; 243 | fRef = 1D3623250D0F684500981E51 /* UntitledAppDelegate.m */; 244 | name = "UntitledAppDelegate.m: 1"; 245 | rLen = 0; 246 | rLoc = 0; 247 | rType = 0; 248 | vrLen = 711; 249 | vrLoc = 0; 250 | }; 251 | 68D230FC13298AA4000E0B9B /* PBXTextBookmark */ = { 252 | isa = PBXTextBookmark; 253 | fRef = 6818867A132943B300459EB0 /* SQLiteManager.m */; 254 | name = "SQLiteManager.m: 246"; 255 | rLen = 0; 256 | rLoc = 5779; 257 | rType = 0; 258 | vrLen = 1274; 259 | vrLoc = 4982; 260 | }; 261 | } 262 | -------------------------------------------------------------------------------- /SQLiteManagerExample/SQLiteManagerExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D3623260D0F684500981E51 /* UntitledAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* UntitledAppDelegate.m */; }; 11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 14 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 15 | 2899E5220DE3E06400AC0155 /* UntitledViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* UntitledViewController.xib */; }; 16 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 17 | 28D7ACF80DDB3853001CB0EB /* UntitledViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* UntitledViewController.m */; }; 18 | 6818867B132943B300459EB0 /* SQLiteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6818867A132943B300459EB0 /* SQLiteManager.m */; }; 19 | 68C7103013297178004555F8 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 68C7102F13297178004555F8 /* libsqlite3.dylib */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 24 | 1D3623240D0F684500981E51 /* UntitledAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UntitledAppDelegate.h; sourceTree = ""; }; 25 | 1D3623250D0F684500981E51 /* UntitledAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UntitledAppDelegate.m; sourceTree = ""; }; 26 | 1D6058910D05DD3D006BFB54 /* SQLiteManagerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SQLiteManagerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 28 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 29 | 2899E5210DE3E06400AC0155 /* UntitledViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = UntitledViewController.xib; sourceTree = ""; }; 30 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 31 | 28D7ACF60DDB3853001CB0EB /* UntitledViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UntitledViewController.h; sourceTree = ""; }; 32 | 28D7ACF70DDB3853001CB0EB /* UntitledViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UntitledViewController.m; sourceTree = ""; }; 33 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 32CA4F630368D1EE00C91783 /* SQLiteManagerExample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteManagerExample_Prefix.pch; sourceTree = ""; }; 35 | 68188679132943B300459EB0 /* SQLiteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteManager.h; path = ../SQLiteManager.h; sourceTree = SOURCE_ROOT; }; 36 | 6818867A132943B300459EB0 /* SQLiteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SQLiteManager.m; path = ../SQLiteManager.m; sourceTree = SOURCE_ROOT; }; 37 | 68C7102F13297178004555F8 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; 38 | 8D1107310486CEB800E47090 /* SQLiteManagerExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SQLiteManagerExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 47 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 48 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 49 | 68C7103013297178004555F8 /* libsqlite3.dylib in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 080E96DDFE201D6D7F000001 /* Classes */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 68188679132943B300459EB0 /* SQLiteManager.h */, 60 | 6818867A132943B300459EB0 /* SQLiteManager.m */, 61 | 1D3623240D0F684500981E51 /* UntitledAppDelegate.h */, 62 | 1D3623250D0F684500981E51 /* UntitledAppDelegate.m */, 63 | 28D7ACF60DDB3853001CB0EB /* UntitledViewController.h */, 64 | 28D7ACF70DDB3853001CB0EB /* UntitledViewController.m */, 65 | ); 66 | path = Classes; 67 | sourceTree = ""; 68 | }; 69 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 1D6058910D05DD3D006BFB54 /* SQLiteManagerExample.app */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 080E96DDFE201D6D7F000001 /* Classes */, 81 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 82 | 29B97317FDCFA39411CA2CEA /* Resources */, 83 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 84 | 19C28FACFE9D520D11CA2CBB /* Products */, 85 | ); 86 | name = CustomTemplate; 87 | sourceTree = ""; 88 | }; 89 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 32CA4F630368D1EE00C91783 /* SQLiteManagerExample_Prefix.pch */, 93 | 29B97316FDCFA39411CA2CEA /* main.m */, 94 | ); 95 | name = "Other Sources"; 96 | sourceTree = ""; 97 | }; 98 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 2899E5210DE3E06400AC0155 /* UntitledViewController.xib */, 102 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 103 | 8D1107310486CEB800E47090 /* SQLiteManagerExample-Info.plist */, 104 | ); 105 | name = Resources; 106 | sourceTree = ""; 107 | }; 108 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 112 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 113 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 114 | 68C7102F13297178004555F8 /* libsqlite3.dylib */, 115 | ); 116 | name = Frameworks; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | 1D6058900D05DD3D006BFB54 /* SQLiteManagerExample */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SQLiteManagerExample" */; 125 | buildPhases = ( 126 | 1D60588D0D05DD3D006BFB54 /* Resources */, 127 | 1D60588E0D05DD3D006BFB54 /* Sources */, 128 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = SQLiteManagerExample; 135 | productName = Untitled; 136 | productReference = 1D6058910D05DD3D006BFB54 /* SQLiteManagerExample.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 143 | isa = PBXProject; 144 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SQLiteManagerExample" */; 145 | compatibilityVersion = "Xcode 3.1"; 146 | developmentRegion = English; 147 | hasScannedForEncodings = 1; 148 | knownRegions = ( 149 | English, 150 | Japanese, 151 | French, 152 | German, 153 | ); 154 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 155 | projectDirPath = ""; 156 | projectRoot = ""; 157 | targets = ( 158 | 1D6058900D05DD3D006BFB54 /* SQLiteManagerExample */, 159 | ); 160 | }; 161 | /* End PBXProject section */ 162 | 163 | /* Begin PBXResourcesBuildPhase section */ 164 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 165 | isa = PBXResourcesBuildPhase; 166 | buildActionMask = 2147483647; 167 | files = ( 168 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 169 | 2899E5220DE3E06400AC0155 /* UntitledViewController.xib in Resources */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXResourcesBuildPhase section */ 174 | 175 | /* Begin PBXSourcesBuildPhase section */ 176 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 177 | isa = PBXSourcesBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 181 | 1D3623260D0F684500981E51 /* UntitledAppDelegate.m in Sources */, 182 | 28D7ACF80DDB3853001CB0EB /* UntitledViewController.m in Sources */, 183 | 6818867B132943B300459EB0 /* SQLiteManager.m in Sources */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | /* End PBXSourcesBuildPhase section */ 188 | 189 | /* Begin XCBuildConfiguration section */ 190 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 191 | isa = XCBuildConfiguration; 192 | buildSettings = { 193 | ALWAYS_SEARCH_USER_PATHS = NO; 194 | COPY_PHASE_STRIP = NO; 195 | GCC_DYNAMIC_NO_PIC = NO; 196 | GCC_OPTIMIZATION_LEVEL = 0; 197 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 198 | GCC_PREFIX_HEADER = SQLiteManagerExample_Prefix.pch; 199 | INFOPLIST_FILE = "SQLiteManagerExample-Info.plist"; 200 | PRODUCT_NAME = SQLiteManagerExample; 201 | }; 202 | name = Debug; 203 | }; 204 | 1D6058950D05DD3E006BFB54 /* Release */ = { 205 | isa = XCBuildConfiguration; 206 | buildSettings = { 207 | ALWAYS_SEARCH_USER_PATHS = NO; 208 | COPY_PHASE_STRIP = YES; 209 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 210 | GCC_PREFIX_HEADER = SQLiteManagerExample_Prefix.pch; 211 | INFOPLIST_FILE = "SQLiteManagerExample-Info.plist"; 212 | PRODUCT_NAME = SQLiteManagerExample; 213 | VALIDATE_PRODUCT = YES; 214 | }; 215 | name = Release; 216 | }; 217 | C01FCF4F08A954540054247B /* Debug */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 221 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 222 | GCC_C_LANGUAGE_STANDARD = c99; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 224 | GCC_WARN_UNUSED_VARIABLE = YES; 225 | PREBINDING = NO; 226 | SDKROOT = iphoneos; 227 | }; 228 | name = Debug; 229 | }; 230 | C01FCF5008A954540054247B /* Release */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 234 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 235 | GCC_C_LANGUAGE_STANDARD = c99; 236 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 239 | PREBINDING = NO; 240 | SDKROOT = iphoneos; 241 | }; 242 | name = Release; 243 | }; 244 | /* End XCBuildConfiguration section */ 245 | 246 | /* Begin XCConfigurationList section */ 247 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SQLiteManagerExample" */ = { 248 | isa = XCConfigurationList; 249 | buildConfigurations = ( 250 | 1D6058940D05DD3E006BFB54 /* Debug */, 251 | 1D6058950D05DD3E006BFB54 /* Release */, 252 | ); 253 | defaultConfigurationIsVisible = 0; 254 | defaultConfigurationName = Release; 255 | }; 256 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SQLiteManagerExample" */ = { 257 | isa = XCConfigurationList; 258 | buildConfigurations = ( 259 | C01FCF4F08A954540054247B /* Debug */, 260 | C01FCF5008A954540054247B /* Release */, 261 | ); 262 | defaultConfigurationIsVisible = 0; 263 | defaultConfigurationName = Release; 264 | }; 265 | /* End XCConfigurationList section */ 266 | }; 267 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 268 | } 269 | -------------------------------------------------------------------------------- /SQLiteManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // SQLiteManager.m 3 | // collections 4 | // 5 | // Created by Ester Sanchez on 10/03/11. 6 | // Copyright 2011 Dinamica Studios. All rights reserved. 7 | // 8 | 9 | #import "SQLiteManager.h" 10 | 11 | // Private methods 12 | @interface SQLiteManager (Private) 13 | 14 | - (NSString *)getDatabasePath; 15 | - (NSError *)createDBErrorWithDescription:(NSString*)description andCode:(int)code; 16 | 17 | @end 18 | 19 | 20 | 21 | @implementation SQLiteManager 22 | 23 | #pragma mark Init & Dealloc 24 | 25 | /** 26 | * Init method. 27 | * Use this method to initialise the object, instead of just "init". 28 | * 29 | * @param name the name of the database to manage. 30 | * 31 | * @return the SQLiteManager object initialised. 32 | */ 33 | 34 | - (id)initWithDatabaseNamed:(NSString *)name; { 35 | self = [super init]; 36 | if (self != nil) { 37 | databaseName = [[NSString alloc] initWithString:name]; 38 | db = nil; 39 | } 40 | return self; 41 | } 42 | 43 | #pragma mark SQLite Operations 44 | 45 | /** 46 | * Open or create a SQLite3 database. 47 | * 48 | * If the db exists, then is opened and ready to use. If not exists then is created and opened. 49 | * 50 | * @return nil if everything was ok, an NSError in other case. 51 | * 52 | */ 53 | 54 | - (NSError *) openDatabase { 55 | 56 | NSError *error = nil; 57 | 58 | NSString *databasePath = [self getDatabasePath]; 59 | 60 | const char *dbpath = [databasePath UTF8String]; 61 | int result = sqlite3_open(dbpath, &db); 62 | if (result != SQLITE_OK) { 63 | const char *errorMsg = sqlite3_errmsg(db); 64 | NSString *errorStr = [NSString stringWithFormat:@"The database could not be opened: %@",[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding]]; 65 | error = [self createDBErrorWithDescription:errorStr andCode:kDBFailAtOpen]; 66 | } 67 | 68 | return error; 69 | } 70 | 71 | 72 | /** 73 | * Does an SQL query. 74 | * 75 | * You should use this method for everything but SELECT statements. 76 | * 77 | * @param sql the sql statement. 78 | * 79 | * @return nil if everything was ok, NSError in other case. 80 | */ 81 | 82 | - (NSError *)doQuery:(NSString *)sql { 83 | 84 | NSError *openError = nil; 85 | NSError *errorQuery = nil; 86 | 87 | //Check if database is open and ready. 88 | if (db == nil) { 89 | openError = [self openDatabase]; 90 | } 91 | 92 | if (openError == nil) { 93 | sqlite3_stmt *statement; 94 | const char *query = [sql UTF8String]; 95 | sqlite3_prepare_v2(db, query, -1, &statement, NULL); 96 | 97 | if (sqlite3_step(statement) == SQLITE_ERROR) { 98 | const char *errorMsg = sqlite3_errmsg(db); 99 | errorQuery = [self createDBErrorWithDescription:[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding] 100 | andCode:kDBErrorQuery]; 101 | } 102 | sqlite3_finalize(statement); 103 | errorQuery = [self closeDatabase]; 104 | } 105 | else { 106 | errorQuery = openError; 107 | } 108 | 109 | return errorQuery; 110 | } 111 | 112 | /** 113 | * Does an SQL parameterized query. 114 | * 115 | * You should use this method for parameterized INSERT or UPDATE statements. 116 | * 117 | * @param sql the sql statement using ? for params. 118 | * 119 | * @param params NSArray of params type (id), in CORRECT order please. 120 | * 121 | * @return nil if everything was ok, NSError in other case. 122 | */ 123 | 124 | - (NSError *)doUpdateQuery:(NSString *)sql withParams:(NSArray *)params { 125 | 126 | NSError *openError = nil; 127 | NSError *errorQuery = nil; 128 | 129 | //Check if database is open and ready. 130 | if (db == nil) { 131 | openError = [self openDatabase]; 132 | } 133 | 134 | if (openError == nil) { 135 | sqlite3_stmt *statement; 136 | const char *query = [sql UTF8String]; 137 | sqlite3_prepare_v2(db, query, -1, &statement, NULL); 138 | 139 | //BIND the params! 140 | int count =0; 141 | for (id param in params ) { 142 | count++; 143 | if ([param isKindOfClass:[NSString class]] ) 144 | sqlite3_bind_text(statement, count, [param UTF8String], -1, SQLITE_TRANSIENT); 145 | if ([param isKindOfClass:[NSNumber class]] ) { 146 | if (!strcmp([param objCType], @encode(float))) 147 | sqlite3_bind_double(statement, count, [param doubleValue]); 148 | else if (!strcmp([param objCType], @encode(int))) 149 | sqlite3_bind_int(statement, count, [param intValue]); 150 | else if (!strcmp([param objCType], @encode(BOOL))) 151 | sqlite3_bind_int(statement, count, [param intValue]); 152 | else 153 | NSLog(@"unknown NSNumber"); 154 | } 155 | if ([param isKindOfClass:[NSDate class]]) { 156 | sqlite3_bind_double(statement, count, [param timeIntervalSince1970]); 157 | } 158 | if ([param isKindOfClass:[NSData class]] ) { 159 | sqlite3_bind_blob(statement, count, [param bytes], [param length], SQLITE_STATIC); 160 | } 161 | } 162 | 163 | if (sqlite3_step(statement) == SQLITE_ERROR) { 164 | const char *errorMsg = sqlite3_errmsg(db); 165 | errorQuery = [self createDBErrorWithDescription:[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding] 166 | andCode:kDBErrorQuery]; 167 | } 168 | sqlite3_finalize(statement); 169 | errorQuery = [self closeDatabase]; 170 | } 171 | else { 172 | errorQuery = openError; 173 | } 174 | 175 | return errorQuery; 176 | } 177 | 178 | - (NSInteger)getLastInsertRowID { 179 | 180 | NSError *openError = nil; 181 | 182 | sqlite3_int64 rowid = 0; 183 | 184 | //Check if database is open and ready. 185 | if (db == nil) { 186 | openError = [self openDatabase]; 187 | } 188 | 189 | if (openError == nil) { 190 | rowid = sqlite3_last_insert_rowid(db); 191 | } 192 | 193 | return (NSInteger)rowid; 194 | } 195 | 196 | /** 197 | * Does a SELECT query and gets the info from the db. 198 | * 199 | * The return array contains an NSDictionary for row, made as: key=columName value= columnValue. 200 | * 201 | * For example, if we have a table named "users" containing: 202 | * name | pass 203 | * ------------- 204 | * admin| 1234 205 | * pepe | 5678 206 | * 207 | * it will return an array with 2 objects: 208 | * resultingArray[0] = name=admin, pass=1234; 209 | * resultingArray[1] = name=pepe, pass=5678; 210 | * 211 | * So to get the admin password: 212 | * [[resultingArray objectAtIndex:0] objectForKey:@"pass"]; 213 | * 214 | * @param sql the sql query (remember to use only a SELECT statement!). 215 | * 216 | * @return an array containing the rows fetched. 217 | */ 218 | 219 | - (NSArray *)getRowsForQuery:(NSString *)sql { 220 | 221 | NSMutableArray *resultsArray = [[NSMutableArray alloc] initWithCapacity:1]; 222 | 223 | if (db == nil) { 224 | [self openDatabase]; 225 | } 226 | 227 | sqlite3_stmt *statement; 228 | const char *query = [sql UTF8String]; 229 | int returnCode = sqlite3_prepare_v2(db, query, -1, &statement, NULL); 230 | 231 | if (returnCode == SQLITE_ERROR) { 232 | const char *errorMsg = sqlite3_errmsg(db); 233 | NSError *errorQuery = [self createDBErrorWithDescription:[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding] 234 | andCode:kDBErrorQuery]; 235 | NSLog(@"%@", errorQuery); 236 | } 237 | 238 | while (sqlite3_step(statement) == SQLITE_ROW) { 239 | int columns = sqlite3_column_count(statement); 240 | NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithCapacity:columns]; 241 | 242 | for (int i = 0; i 0) { 273 | const void *blob = sqlite3_column_blob(statement, i); 274 | if (blob != NULL) { 275 | [result setObject:[NSData dataWithBytes:blob length:bytes] forKey:columnName]; 276 | } 277 | } 278 | break; 279 | } 280 | 281 | case SQLITE_NULL: 282 | [result setObject:[NSNull null] forKey:columnName]; 283 | break; 284 | 285 | default: 286 | { 287 | const char *value = (const char *)sqlite3_column_text(statement, i); 288 | [result setObject:[NSString stringWithCString:value encoding:NSUTF8StringEncoding] forKey:columnName]; 289 | break; 290 | } 291 | 292 | } //end switch 293 | 294 | 295 | } //end for 296 | 297 | [resultsArray addObject:result]; 298 | 299 | } //end while 300 | sqlite3_finalize(statement); 301 | 302 | [self closeDatabase]; 303 | 304 | return resultsArray; 305 | 306 | } 307 | 308 | 309 | /** 310 | * Closes the database. 311 | * 312 | * @return nil if everything was ok, NSError in other case. 313 | */ 314 | 315 | - (NSError *) closeDatabase { 316 | 317 | NSError *error = nil; 318 | 319 | 320 | if (db != nil) { 321 | if (sqlite3_close(db) != SQLITE_OK){ 322 | const char *errorMsg = sqlite3_errmsg(db); 323 | NSString *errorStr = [NSString stringWithFormat:@"The database could not be closed: %@",[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding]]; 324 | error = [self createDBErrorWithDescription:errorStr andCode:kDBFailAtClose]; 325 | } 326 | 327 | db = nil; 328 | } 329 | 330 | return error; 331 | } 332 | 333 | 334 | /** 335 | * Creates an SQL dump of the database. 336 | * 337 | * This method could get a csv format dump with a few changes. 338 | * But i prefer working with sql dumps ;) 339 | * 340 | * @return an NSString containing the dump. 341 | */ 342 | 343 | - (NSString *)getDatabaseDump { 344 | 345 | NSMutableString *dump = [[NSMutableString alloc] initWithCapacity:256]; 346 | 347 | // info string ;) please do not remove it 348 | [dump appendString:@";\n; Dump generated with SQLiteManager4iOS \n;\n; By Misato (2011)\n"]; 349 | [dump appendString:[NSString stringWithFormat:@"; database %@;\n", [databaseName lastPathComponent]]]; 350 | 351 | // first get all table information 352 | 353 | NSArray *rows = [self getRowsForQuery:@"SELECT * FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%';"]; 354 | // last sql query returns something like: 355 | // { 356 | // name = users; 357 | // rootpage = 2; 358 | // sql = "CREATE TABLE users (id integer primary key autoincrement, user text, password text)"; 359 | // "tbl_name" = users; 360 | // type = table; 361 | // } 362 | 363 | //loop through all tables 364 | for (int i = 0; i<[rows count]; i++) { 365 | 366 | NSDictionary *obj = [rows objectAtIndex:i]; 367 | //get sql "create table" sentence 368 | NSString *sql = [obj objectForKey:@"sql"]; 369 | [dump appendString:[NSString stringWithFormat:@"%@;\n",sql]]; 370 | 371 | //get table name 372 | NSString *tableName = [obj objectForKey:@"name"]; 373 | 374 | //get all table content 375 | NSArray *tableContent = [self getRowsForQuery:[NSString stringWithFormat:@"SELECT * FROM %@",tableName]]; 376 | 377 | for (int j = 0; j<[tableContent count]; j++) { 378 | NSDictionary *item = [tableContent objectAtIndex:j]; 379 | 380 | //keys are column names 381 | NSArray *keys = [item allKeys]; 382 | 383 | //values are column values 384 | NSArray *values = [item allValues]; 385 | 386 | //start constructing insert statement for this item 387 | [dump appendString:[NSString stringWithFormat:@"insert into %@ (",tableName]]; 388 | 389 | //loop through all keys (aka column names) 390 | NSEnumerator *enumerator = [keys objectEnumerator]; 391 | id obj; 392 | while (obj = [enumerator nextObject]) { 393 | [dump appendString:[NSString stringWithFormat:@"%@,",obj]]; 394 | } 395 | 396 | //delete last comma 397 | NSRange range; 398 | range.length = 1; 399 | range.location = [dump length]-1; 400 | [dump deleteCharactersInRange:range]; 401 | [dump appendString:@") values ("]; 402 | 403 | // loop through all values 404 | // value types could be: 405 | // NSNumber for integer and floats, NSNull for null or NSString for text. 406 | 407 | enumerator = [values objectEnumerator]; 408 | while (obj = [enumerator nextObject]) { 409 | //if it's a number (integer or float) 410 | if ([obj isKindOfClass:[NSNumber class]]){ 411 | [dump appendString:[NSString stringWithFormat:@"%@,",[obj stringValue]]]; 412 | } 413 | //if it's a null 414 | else if ([obj isKindOfClass:[NSNull class]]){ 415 | [dump appendString:@"null,"]; 416 | } 417 | //else is a string ;) 418 | else{ 419 | [dump appendString:[NSString stringWithFormat:@"'%@',",obj]]; 420 | } 421 | 422 | } 423 | 424 | //delete last comma again 425 | range.length = 1; 426 | range.location = [dump length]-1; 427 | [dump deleteCharactersInRange:range]; 428 | 429 | //finish our insert statement 430 | [dump appendString:@");\n"]; 431 | 432 | } 433 | 434 | } 435 | 436 | return dump; 437 | } 438 | 439 | @end 440 | 441 | 442 | #pragma mark - 443 | @implementation SQLiteManager (Private) 444 | 445 | /** 446 | * Gets the database file path (in NSDocumentDirectory). 447 | * 448 | * @return the path to the db file. 449 | */ 450 | 451 | - (NSString *)getDatabasePath{ 452 | 453 | if([[NSFileManager defaultManager] fileExistsAtPath:databaseName]){ 454 | // Already Full Path 455 | return databaseName; 456 | } else { 457 | // Get the documents directory 458 | NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 459 | NSString *docsDir = [dirPaths objectAtIndex:0]; 460 | 461 | return [docsDir stringByAppendingPathComponent:databaseName]; 462 | } 463 | } 464 | 465 | /** 466 | * Creates an NSError. 467 | * 468 | * @param description the description wich can be queried with [error localizedDescription]; 469 | * @param code the error code (code erors are defined as enum in the header file). 470 | * 471 | * @return the NSError just created. 472 | * 473 | */ 474 | 475 | - (NSError *)createDBErrorWithDescription:(NSString*)description andCode:(int)code { 476 | 477 | NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:description, NSLocalizedDescriptionKey, nil]; 478 | NSError *error = [NSError errorWithDomain:@"SQLite Error" code:code userInfo:userInfo]; 479 | 480 | return error; 481 | } 482 | 483 | @end 484 | 485 | -------------------------------------------------------------------------------- /SQLiteManagerExample/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D571 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | UntitledViewController 45 | 46 | 47 | 1 48 | 49 | IBCocoaTouchFramework 50 | NO 51 | 52 | 53 | 54 | 292 55 | {320, 480} 56 | 57 | 1 58 | MSAxIDEAA 59 | 60 | NO 61 | NO 62 | 63 | IBCocoaTouchFramework 64 | YES 65 | 66 | 67 | 68 | 69 | YES 70 | 71 | 72 | delegate 73 | 74 | 75 | 76 | 4 77 | 78 | 79 | 80 | viewController 81 | 82 | 83 | 84 | 11 85 | 86 | 87 | 88 | window 89 | 90 | 91 | 92 | 14 93 | 94 | 95 | 96 | 97 | YES 98 | 99 | 0 100 | 101 | 102 | 103 | 104 | 105 | -1 106 | 107 | 108 | File's Owner 109 | 110 | 111 | 3 112 | 113 | 114 | Untitled App Delegate 115 | 116 | 117 | -2 118 | 119 | 120 | 121 | 122 | 10 123 | 124 | 125 | 126 | 127 | 12 128 | 129 | 130 | 131 | 132 | 133 | 134 | YES 135 | 136 | YES 137 | -1.CustomClassName 138 | -2.CustomClassName 139 | 10.CustomClassName 140 | 10.IBEditorWindowLastContentRect 141 | 10.IBPluginDependency 142 | 12.IBEditorWindowLastContentRect 143 | 12.IBPluginDependency 144 | 3.CustomClassName 145 | 3.IBPluginDependency 146 | 147 | 148 | YES 149 | UIApplication 150 | UIResponder 151 | UntitledViewController 152 | {{234, 376}, {320, 480}} 153 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 154 | {{525, 346}, {320, 480}} 155 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 156 | UntitledAppDelegate 157 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 158 | 159 | 160 | 161 | YES 162 | 163 | 164 | YES 165 | 166 | 167 | 168 | 169 | YES 170 | 171 | 172 | YES 173 | 174 | 175 | 176 | 15 177 | 178 | 179 | 180 | YES 181 | 182 | UIWindow 183 | UIView 184 | 185 | IBUserSource 186 | 187 | 188 | 189 | 190 | UntitledAppDelegate 191 | NSObject 192 | 193 | YES 194 | 195 | YES 196 | viewController 197 | window 198 | 199 | 200 | YES 201 | UntitledViewController 202 | UIWindow 203 | 204 | 205 | 206 | YES 207 | 208 | YES 209 | viewController 210 | window 211 | 212 | 213 | YES 214 | 215 | viewController 216 | UntitledViewController 217 | 218 | 219 | window 220 | UIWindow 221 | 222 | 223 | 224 | 225 | IBProjectSource 226 | Classes/UntitledAppDelegate.h 227 | 228 | 229 | 230 | UntitledAppDelegate 231 | NSObject 232 | 233 | IBUserSource 234 | 235 | 236 | 237 | 238 | UntitledViewController 239 | UIViewController 240 | 241 | IBProjectSource 242 | Classes/UntitledViewController.h 243 | 244 | 245 | 246 | 247 | YES 248 | 249 | NSObject 250 | 251 | IBFrameworkSource 252 | Foundation.framework/Headers/NSError.h 253 | 254 | 255 | 256 | NSObject 257 | 258 | IBFrameworkSource 259 | Foundation.framework/Headers/NSFileManager.h 260 | 261 | 262 | 263 | NSObject 264 | 265 | IBFrameworkSource 266 | Foundation.framework/Headers/NSKeyValueCoding.h 267 | 268 | 269 | 270 | NSObject 271 | 272 | IBFrameworkSource 273 | Foundation.framework/Headers/NSKeyValueObserving.h 274 | 275 | 276 | 277 | NSObject 278 | 279 | IBFrameworkSource 280 | Foundation.framework/Headers/NSKeyedArchiver.h 281 | 282 | 283 | 284 | NSObject 285 | 286 | IBFrameworkSource 287 | Foundation.framework/Headers/NSObject.h 288 | 289 | 290 | 291 | NSObject 292 | 293 | IBFrameworkSource 294 | Foundation.framework/Headers/NSRunLoop.h 295 | 296 | 297 | 298 | NSObject 299 | 300 | IBFrameworkSource 301 | Foundation.framework/Headers/NSThread.h 302 | 303 | 304 | 305 | NSObject 306 | 307 | IBFrameworkSource 308 | Foundation.framework/Headers/NSURL.h 309 | 310 | 311 | 312 | NSObject 313 | 314 | IBFrameworkSource 315 | Foundation.framework/Headers/NSURLConnection.h 316 | 317 | 318 | 319 | NSObject 320 | 321 | IBFrameworkSource 322 | UIKit.framework/Headers/UIAccessibility.h 323 | 324 | 325 | 326 | NSObject 327 | 328 | IBFrameworkSource 329 | UIKit.framework/Headers/UINibLoading.h 330 | 331 | 332 | 333 | NSObject 334 | 335 | IBFrameworkSource 336 | UIKit.framework/Headers/UIResponder.h 337 | 338 | 339 | 340 | UIApplication 341 | UIResponder 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UIApplication.h 345 | 346 | 347 | 348 | UIResponder 349 | NSObject 350 | 351 | 352 | 353 | UISearchBar 354 | UIView 355 | 356 | IBFrameworkSource 357 | UIKit.framework/Headers/UISearchBar.h 358 | 359 | 360 | 361 | UISearchDisplayController 362 | NSObject 363 | 364 | IBFrameworkSource 365 | UIKit.framework/Headers/UISearchDisplayController.h 366 | 367 | 368 | 369 | UIView 370 | 371 | IBFrameworkSource 372 | UIKit.framework/Headers/UITextField.h 373 | 374 | 375 | 376 | UIView 377 | UIResponder 378 | 379 | IBFrameworkSource 380 | UIKit.framework/Headers/UIView.h 381 | 382 | 383 | 384 | UIViewController 385 | 386 | IBFrameworkSource 387 | UIKit.framework/Headers/UINavigationController.h 388 | 389 | 390 | 391 | UIViewController 392 | 393 | IBFrameworkSource 394 | UIKit.framework/Headers/UIPopoverController.h 395 | 396 | 397 | 398 | UIViewController 399 | 400 | IBFrameworkSource 401 | UIKit.framework/Headers/UISplitViewController.h 402 | 403 | 404 | 405 | UIViewController 406 | 407 | IBFrameworkSource 408 | UIKit.framework/Headers/UITabBarController.h 409 | 410 | 411 | 412 | UIViewController 413 | UIResponder 414 | 415 | IBFrameworkSource 416 | UIKit.framework/Headers/UIViewController.h 417 | 418 | 419 | 420 | UIWindow 421 | UIView 422 | 423 | IBFrameworkSource 424 | UIKit.framework/Headers/UIWindow.h 425 | 426 | 427 | 428 | 429 | 0 430 | IBCocoaTouchFramework 431 | 432 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 433 | 434 | 435 | 436 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 437 | 438 | 439 | YES 440 | Untitled.xcodeproj 441 | 3 442 | 112 443 | 444 | 445 | -------------------------------------------------------------------------------- /SQLiteManagerExample/UntitledViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J567 6 | 823 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 132 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | 44 | YES 45 | 46 | 47 | 274 48 | {{0, 101}, {320, 359}} 49 | 50 | 51 | 1 52 | MSAxIDEAA 53 | 54 | YES 55 | YES 56 | IBCocoaTouchFramework 57 | NO 58 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 59 | 60 | 2 61 | IBCocoaTouchFramework 62 | 63 | 64 | 65 | 66 | 292 67 | {{37, 11}, {246, 37}} 68 | 69 | NO 70 | IBCocoaTouchFramework 71 | 0 72 | 0 73 | 74 | Helvetica-Bold 75 | 15 76 | 16 77 | 78 | 1 79 | Add Table "users" if not exists 80 | 81 | 3 82 | MQA 83 | 84 | 85 | 1 86 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 87 | 88 | 89 | 3 90 | MC41AA 91 | 92 | 93 | 94 | 95 | 292 96 | {{37, 56}, {246, 37}} 97 | 98 | NO 99 | IBCocoaTouchFramework 100 | 0 101 | 0 102 | 103 | 1 104 | Add user 105 | 106 | 107 | 1 108 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 109 | 110 | 111 | 112 | 113 | {320, 460} 114 | 115 | 116 | 3 117 | MC45NzE3NzQxOTM1AA 118 | 119 | NO 120 | 121 | IBCocoaTouchFramework 122 | 123 | 124 | 125 | 126 | YES 127 | 128 | 129 | view 130 | 131 | 132 | 133 | 7 134 | 135 | 136 | 137 | textView 138 | 139 | 140 | 141 | 9 142 | 143 | 144 | 145 | addUser 146 | 147 | 148 | 7 149 | 150 | 15 151 | 152 | 153 | 154 | addTable 155 | 156 | 157 | 7 158 | 159 | 16 160 | 161 | 162 | 163 | 164 | YES 165 | 166 | 0 167 | 168 | 169 | 170 | 171 | 172 | -1 173 | 174 | 175 | File's Owner 176 | 177 | 178 | -2 179 | 180 | 181 | 182 | 183 | 6 184 | 185 | 186 | YES 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 8 195 | 196 | 197 | 198 | 199 | 10 200 | 201 | 202 | 203 | 204 | 13 205 | 206 | 207 | 208 | 209 | 210 | 211 | YES 212 | 213 | YES 214 | -1.CustomClassName 215 | -2.CustomClassName 216 | 10.IBPluginDependency 217 | 10.IBViewBoundsToFrameTransform 218 | 13.IBPluginDependency 219 | 13.IBViewBoundsToFrameTransform 220 | 6.IBEditorWindowLastContentRect 221 | 6.IBPluginDependency 222 | 8.IBPluginDependency 223 | 8.IBViewBoundsToFrameTransform 224 | 225 | 226 | YES 227 | UntitledViewController 228 | UIResponder 229 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 230 | 231 | P4AAAL+AAADCEAAAwjQAAA 232 | 233 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 234 | 235 | P4AAAL+AAABC6AAAwsoAAA 236 | 237 | {{239, 276}, {320, 480}} 238 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 239 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 240 | 241 | P4AAAL+AAAAAAAAAw+UAAA 242 | 243 | 244 | 245 | 246 | YES 247 | 248 | 249 | YES 250 | 251 | 252 | 253 | 254 | YES 255 | 256 | 257 | YES 258 | 259 | 260 | 261 | 16 262 | 263 | 264 | 265 | YES 266 | 267 | UntitledViewController 268 | UIViewController 269 | 270 | YES 271 | 272 | YES 273 | addTable 274 | addUser 275 | 276 | 277 | YES 278 | id 279 | id 280 | 281 | 282 | 283 | YES 284 | 285 | YES 286 | addTable 287 | addUser 288 | 289 | 290 | YES 291 | 292 | addTable 293 | id 294 | 295 | 296 | addUser 297 | id 298 | 299 | 300 | 301 | 302 | textView 303 | UITextView 304 | 305 | 306 | textView 307 | 308 | textView 309 | UITextView 310 | 311 | 312 | 313 | IBProjectSource 314 | Classes/UntitledViewController.h 315 | 316 | 317 | 318 | 319 | YES 320 | 321 | NSObject 322 | 323 | IBFrameworkSource 324 | Foundation.framework/Headers/NSError.h 325 | 326 | 327 | 328 | NSObject 329 | 330 | IBFrameworkSource 331 | Foundation.framework/Headers/NSFileManager.h 332 | 333 | 334 | 335 | NSObject 336 | 337 | IBFrameworkSource 338 | Foundation.framework/Headers/NSKeyValueCoding.h 339 | 340 | 341 | 342 | NSObject 343 | 344 | IBFrameworkSource 345 | Foundation.framework/Headers/NSKeyValueObserving.h 346 | 347 | 348 | 349 | NSObject 350 | 351 | IBFrameworkSource 352 | Foundation.framework/Headers/NSKeyedArchiver.h 353 | 354 | 355 | 356 | NSObject 357 | 358 | IBFrameworkSource 359 | Foundation.framework/Headers/NSObject.h 360 | 361 | 362 | 363 | NSObject 364 | 365 | IBFrameworkSource 366 | Foundation.framework/Headers/NSRunLoop.h 367 | 368 | 369 | 370 | NSObject 371 | 372 | IBFrameworkSource 373 | Foundation.framework/Headers/NSThread.h 374 | 375 | 376 | 377 | NSObject 378 | 379 | IBFrameworkSource 380 | Foundation.framework/Headers/NSURL.h 381 | 382 | 383 | 384 | NSObject 385 | 386 | IBFrameworkSource 387 | Foundation.framework/Headers/NSURLConnection.h 388 | 389 | 390 | 391 | NSObject 392 | 393 | IBFrameworkSource 394 | UIKit.framework/Headers/UIAccessibility.h 395 | 396 | 397 | 398 | NSObject 399 | 400 | IBFrameworkSource 401 | UIKit.framework/Headers/UINibLoading.h 402 | 403 | 404 | 405 | NSObject 406 | 407 | IBFrameworkSource 408 | UIKit.framework/Headers/UIResponder.h 409 | 410 | 411 | 412 | UIButton 413 | UIControl 414 | 415 | IBFrameworkSource 416 | UIKit.framework/Headers/UIButton.h 417 | 418 | 419 | 420 | UIControl 421 | UIView 422 | 423 | IBFrameworkSource 424 | UIKit.framework/Headers/UIControl.h 425 | 426 | 427 | 428 | UIResponder 429 | NSObject 430 | 431 | 432 | 433 | UIScrollView 434 | UIView 435 | 436 | IBFrameworkSource 437 | UIKit.framework/Headers/UIScrollView.h 438 | 439 | 440 | 441 | UISearchBar 442 | UIView 443 | 444 | IBFrameworkSource 445 | UIKit.framework/Headers/UISearchBar.h 446 | 447 | 448 | 449 | UISearchDisplayController 450 | NSObject 451 | 452 | IBFrameworkSource 453 | UIKit.framework/Headers/UISearchDisplayController.h 454 | 455 | 456 | 457 | UITextView 458 | UIScrollView 459 | 460 | IBFrameworkSource 461 | UIKit.framework/Headers/UITextView.h 462 | 463 | 464 | 465 | UIView 466 | 467 | IBFrameworkSource 468 | UIKit.framework/Headers/UIPrintFormatter.h 469 | 470 | 471 | 472 | UIView 473 | 474 | IBFrameworkSource 475 | UIKit.framework/Headers/UITextField.h 476 | 477 | 478 | 479 | UIView 480 | UIResponder 481 | 482 | IBFrameworkSource 483 | UIKit.framework/Headers/UIView.h 484 | 485 | 486 | 487 | UIViewController 488 | 489 | IBFrameworkSource 490 | UIKit.framework/Headers/UINavigationController.h 491 | 492 | 493 | 494 | UIViewController 495 | 496 | IBFrameworkSource 497 | UIKit.framework/Headers/UIPopoverController.h 498 | 499 | 500 | 501 | UIViewController 502 | 503 | IBFrameworkSource 504 | UIKit.framework/Headers/UISplitViewController.h 505 | 506 | 507 | 508 | UIViewController 509 | 510 | IBFrameworkSource 511 | UIKit.framework/Headers/UITabBarController.h 512 | 513 | 514 | 515 | UIViewController 516 | UIResponder 517 | 518 | IBFrameworkSource 519 | UIKit.framework/Headers/UIViewController.h 520 | 521 | 522 | 523 | 524 | 0 525 | IBCocoaTouchFramework 526 | 527 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 528 | 529 | 530 | 531 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 532 | 533 | 534 | YES 535 | SQLiteManagerExample.xcodeproj 536 | 3 537 | 132 538 | 539 | 540 | -------------------------------------------------------------------------------- /SQLiteManagerExample/SQLiteManagerExample.xcodeproj/misato.mode1v3: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActivePerspectiveName 6 | Project 7 | AllowedModules 8 | 9 | 10 | BundleLoadPath 11 | 12 | MaxInstances 13 | n 14 | Module 15 | PBXSmartGroupTreeModule 16 | Name 17 | Groups and Files Outline View 18 | 19 | 20 | BundleLoadPath 21 | 22 | MaxInstances 23 | n 24 | Module 25 | PBXNavigatorGroup 26 | Name 27 | Editor 28 | 29 | 30 | BundleLoadPath 31 | 32 | MaxInstances 33 | n 34 | Module 35 | XCTaskListModule 36 | Name 37 | Task List 38 | 39 | 40 | BundleLoadPath 41 | 42 | MaxInstances 43 | n 44 | Module 45 | XCDetailModule 46 | Name 47 | File and Smart Group Detail Viewer 48 | 49 | 50 | BundleLoadPath 51 | 52 | MaxInstances 53 | 1 54 | Module 55 | PBXBuildResultsModule 56 | Name 57 | Detailed Build Results Viewer 58 | 59 | 60 | BundleLoadPath 61 | 62 | MaxInstances 63 | 1 64 | Module 65 | PBXProjectFindModule 66 | Name 67 | Project Batch Find Tool 68 | 69 | 70 | BundleLoadPath 71 | 72 | MaxInstances 73 | n 74 | Module 75 | XCProjectFormatConflictsModule 76 | Name 77 | Project Format Conflicts List 78 | 79 | 80 | BundleLoadPath 81 | 82 | MaxInstances 83 | n 84 | Module 85 | PBXBookmarksModule 86 | Name 87 | Bookmarks Tool 88 | 89 | 90 | BundleLoadPath 91 | 92 | MaxInstances 93 | n 94 | Module 95 | PBXClassBrowserModule 96 | Name 97 | Class Browser 98 | 99 | 100 | BundleLoadPath 101 | 102 | MaxInstances 103 | n 104 | Module 105 | PBXCVSModule 106 | Name 107 | Source Code Control Tool 108 | 109 | 110 | BundleLoadPath 111 | 112 | MaxInstances 113 | n 114 | Module 115 | PBXDebugBreakpointsModule 116 | Name 117 | Debug Breakpoints Tool 118 | 119 | 120 | BundleLoadPath 121 | 122 | MaxInstances 123 | n 124 | Module 125 | XCDockableInspector 126 | Name 127 | Inspector 128 | 129 | 130 | BundleLoadPath 131 | 132 | MaxInstances 133 | n 134 | Module 135 | PBXOpenQuicklyModule 136 | Name 137 | Open Quickly Tool 138 | 139 | 140 | BundleLoadPath 141 | 142 | MaxInstances 143 | 1 144 | Module 145 | PBXDebugSessionModule 146 | Name 147 | Debugger 148 | 149 | 150 | BundleLoadPath 151 | 152 | MaxInstances 153 | 1 154 | Module 155 | PBXDebugCLIModule 156 | Name 157 | Debug Console 158 | 159 | 160 | BundleLoadPath 161 | 162 | MaxInstances 163 | n 164 | Module 165 | XCSnapshotModule 166 | Name 167 | Snapshots Tool 168 | 169 | 170 | BundlePath 171 | /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources 172 | Description 173 | DefaultDescriptionKey 174 | DockingSystemVisible 175 | 176 | Extension 177 | mode1v3 178 | FavBarConfig 179 | 180 | PBXProjectModuleGUID 181 | 68188682132943CE00459EB0 182 | XCBarModuleItemNames 183 | 184 | XCBarModuleItems 185 | 186 | 187 | FirstTimeWindowDisplayed 188 | 189 | Identifier 190 | com.apple.perspectives.project.mode1v3 191 | MajorVersion 192 | 33 193 | MinorVersion 194 | 0 195 | Name 196 | Default 197 | Notifications 198 | 199 | OpenEditors 200 | 201 | PerspectiveWidths 202 | 203 | -1 204 | -1 205 | 206 | Perspectives 207 | 208 | 209 | ChosenToolbarItems 210 | 211 | active-combo-popup 212 | action 213 | NSToolbarFlexibleSpaceItem 214 | servicesModuledebug 215 | debugger-enable-breakpoints 216 | build-and-go 217 | clean-target 218 | com.apple.ide.PBXToolbarStopButton 219 | toggle-editor 220 | get-info 221 | servicesModuleCVS 222 | NSToolbarFlexibleSpaceItem 223 | com.apple.pbx.toolbar.searchfield 224 | 225 | ControllerClassBaseName 226 | 227 | IconName 228 | WindowOfProjectWithEditor 229 | Identifier 230 | perspective.project 231 | IsVertical 232 | 233 | Layout 234 | 235 | 236 | ContentConfiguration 237 | 238 | PBXBottomSmartGroupGIDs 239 | 240 | 1C37FBAC04509CD000000102 241 | 1C37FAAC04509CD000000102 242 | 1C37FABC05509CD000000102 243 | 1C37FABC05539CD112110102 244 | E2644B35053B69B200211256 245 | 1C37FABC04509CD000100104 246 | 1CC0EA4004350EF90044410B 247 | 1CC0EA4004350EF90041110B 248 | 249 | PBXProjectModuleGUID 250 | 1CE0B1FE06471DED0097A5F4 251 | PBXProjectModuleLabel 252 | Files 253 | PBXProjectStructureProvided 254 | yes 255 | PBXSmartGroupTreeModuleColumnData 256 | 257 | PBXSmartGroupTreeModuleColumnWidthsKey 258 | 259 | 186 260 | 261 | PBXSmartGroupTreeModuleColumnsKey_v4 262 | 263 | MainColumn 264 | 265 | 266 | PBXSmartGroupTreeModuleOutlineStateKey_v7 267 | 268 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 269 | 270 | 29B97314FDCFA39411CA2CEA 271 | 080E96DDFE201D6D7F000001 272 | 29B97317FDCFA39411CA2CEA 273 | 1C37FABC05509CD000000102 274 | 275 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 276 | 277 | 278 | 3 279 | 1 280 | 0 281 | 282 | 283 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 284 | {{0, 0}, {186, 595}} 285 | 286 | PBXTopSmartGroupGIDs 287 | 288 | XCIncludePerspectivesSwitch 289 | 290 | XCSharingToken 291 | com.apple.Xcode.GFSharingToken 292 | 293 | GeometryConfiguration 294 | 295 | Frame 296 | {{0, 0}, {203, 613}} 297 | GroupTreeTableConfiguration 298 | 299 | MainColumn 300 | 186 301 | 302 | RubberWindowFrame 303 | 0 124 1280 654 0 0 1280 778 304 | 305 | Module 306 | PBXSmartGroupTreeModule 307 | Proportion 308 | 203pt 309 | 310 | 311 | Dock 312 | 313 | 314 | BecomeActive 315 | 316 | ContentConfiguration 317 | 318 | PBXProjectModuleGUID 319 | 1CE0B20306471E060097A5F4 320 | PBXProjectModuleLabel 321 | SQLiteManager.m 322 | PBXSplitModuleInNavigatorKey 323 | 324 | Split0 325 | 326 | PBXProjectModuleGUID 327 | 1CE0B20406471E060097A5F4 328 | PBXProjectModuleLabel 329 | SQLiteManager.m 330 | _historyCapacity 331 | 0 332 | bookmark 333 | 68D230FC13298AA4000E0B9B 334 | history 335 | 336 | 68C71059132974F6004555F8 337 | 6867C48A1329816700064A1E 338 | 6867C4C01329840300064A1E 339 | 6867C4D5132988D500064A1E 340 | 6867C4D813298A8800064A1E 341 | 342 | 343 | SplitCount 344 | 1 345 | 346 | StatusBarVisibility 347 | 348 | 349 | GeometryConfiguration 350 | 351 | Frame 352 | {{0, 0}, {1072, 608}} 353 | RubberWindowFrame 354 | 0 124 1280 654 0 0 1280 778 355 | 356 | Module 357 | PBXNavigatorGroup 358 | Proportion 359 | 608pt 360 | 361 | 362 | ContentConfiguration 363 | 364 | PBXProjectModuleGUID 365 | 1CE0B20506471E060097A5F4 366 | PBXProjectModuleLabel 367 | Detail 368 | 369 | GeometryConfiguration 370 | 371 | Frame 372 | {{0, 613}, {1072, 0}} 373 | RubberWindowFrame 374 | 0 124 1280 654 0 0 1280 778 375 | 376 | Module 377 | XCDetailModule 378 | Proportion 379 | 0pt 380 | 381 | 382 | Proportion 383 | 1072pt 384 | 385 | 386 | Name 387 | Project 388 | ServiceClasses 389 | 390 | XCModuleDock 391 | PBXSmartGroupTreeModule 392 | XCModuleDock 393 | PBXNavigatorGroup 394 | XCDetailModule 395 | 396 | TableOfContents 397 | 398 | 68D230F913298AA4000E0B9B 399 | 1CE0B1FE06471DED0097A5F4 400 | 68D230FA13298AA4000E0B9B 401 | 1CE0B20306471E060097A5F4 402 | 1CE0B20506471E060097A5F4 403 | 404 | ToolbarConfigUserDefaultsMinorVersion 405 | 2 406 | ToolbarConfiguration 407 | xcode.toolbar.config.defaultV3 408 | 409 | 410 | ControllerClassBaseName 411 | 412 | IconName 413 | WindowOfProject 414 | Identifier 415 | perspective.morph 416 | IsVertical 417 | 0 418 | Layout 419 | 420 | 421 | BecomeActive 422 | 1 423 | ContentConfiguration 424 | 425 | PBXBottomSmartGroupGIDs 426 | 427 | 1C37FBAC04509CD000000102 428 | 1C37FAAC04509CD000000102 429 | 1C08E77C0454961000C914BD 430 | 1C37FABC05509CD000000102 431 | 1C37FABC05539CD112110102 432 | E2644B35053B69B200211256 433 | 1C37FABC04509CD000100104 434 | 1CC0EA4004350EF90044410B 435 | 1CC0EA4004350EF90041110B 436 | 437 | PBXProjectModuleGUID 438 | 11E0B1FE06471DED0097A5F4 439 | PBXProjectModuleLabel 440 | Files 441 | PBXProjectStructureProvided 442 | yes 443 | PBXSmartGroupTreeModuleColumnData 444 | 445 | PBXSmartGroupTreeModuleColumnWidthsKey 446 | 447 | 186 448 | 449 | PBXSmartGroupTreeModuleColumnsKey_v4 450 | 451 | MainColumn 452 | 453 | 454 | PBXSmartGroupTreeModuleOutlineStateKey_v7 455 | 456 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 457 | 458 | 29B97314FDCFA39411CA2CEA 459 | 1C37FABC05509CD000000102 460 | 461 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 462 | 463 | 464 | 0 465 | 466 | 467 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 468 | {{0, 0}, {186, 337}} 469 | 470 | PBXTopSmartGroupGIDs 471 | 472 | XCIncludePerspectivesSwitch 473 | 1 474 | XCSharingToken 475 | com.apple.Xcode.GFSharingToken 476 | 477 | GeometryConfiguration 478 | 479 | Frame 480 | {{0, 0}, {203, 355}} 481 | GroupTreeTableConfiguration 482 | 483 | MainColumn 484 | 186 485 | 486 | RubberWindowFrame 487 | 373 269 690 397 0 0 1440 878 488 | 489 | Module 490 | PBXSmartGroupTreeModule 491 | Proportion 492 | 100% 493 | 494 | 495 | Name 496 | Morph 497 | PreferredWidth 498 | 300 499 | ServiceClasses 500 | 501 | XCModuleDock 502 | PBXSmartGroupTreeModule 503 | 504 | TableOfContents 505 | 506 | 11E0B1FE06471DED0097A5F4 507 | 508 | ToolbarConfiguration 509 | xcode.toolbar.config.default.shortV3 510 | 511 | 512 | PerspectivesBarVisible 513 | 514 | ShelfIsVisible 515 | 516 | SourceDescription 517 | file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' 518 | StatusbarIsVisible 519 | 520 | TimeStamp 521 | 0.0 522 | ToolbarConfigUserDefaultsMinorVersion 523 | 2 524 | ToolbarDisplayMode 525 | 1 526 | ToolbarIsVisible 527 | 528 | ToolbarSizeMode 529 | 1 530 | Type 531 | Perspectives 532 | UpdateMessage 533 | The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? 534 | WindowJustification 535 | 5 536 | WindowOrderList 537 | 538 | 68188683132943CE00459EB0 539 | /Users/misato/Desktop/iphoneDev/projects/SQLiteManager4iOS/Untitled/SQLiteManagerExample.xcodeproj 540 | 541 | WindowString 542 | 0 124 1280 654 0 0 1280 778 543 | WindowToolsV3 544 | 545 | 546 | FirstTimeWindowDisplayed 547 | 548 | Identifier 549 | windowTool.build 550 | IsVertical 551 | 552 | Layout 553 | 554 | 555 | Dock 556 | 557 | 558 | ContentConfiguration 559 | 560 | PBXProjectModuleGUID 561 | 1CD0528F0623707200166675 562 | PBXProjectModuleLabel 563 | 564 | StatusBarVisibility 565 | 566 | 567 | GeometryConfiguration 568 | 569 | Frame 570 | {{0, 0}, {500, 218}} 571 | RubberWindowFrame 572 | 267 217 500 500 0 0 1280 778 573 | 574 | Module 575 | PBXNavigatorGroup 576 | Proportion 577 | 218pt 578 | 579 | 580 | ContentConfiguration 581 | 582 | PBXProjectModuleGUID 583 | XCMainBuildResultsModuleGUID 584 | PBXProjectModuleLabel 585 | Build Results 586 | XCBuildResultsTrigger_Collapse 587 | 1021 588 | XCBuildResultsTrigger_Open 589 | 1011 590 | 591 | GeometryConfiguration 592 | 593 | Frame 594 | {{0, 223}, {500, 236}} 595 | RubberWindowFrame 596 | 267 217 500 500 0 0 1280 778 597 | 598 | Module 599 | PBXBuildResultsModule 600 | Proportion 601 | 236pt 602 | 603 | 604 | Proportion 605 | 459pt 606 | 607 | 608 | Name 609 | Build Results 610 | ServiceClasses 611 | 612 | PBXBuildResultsModule 613 | 614 | StatusbarIsVisible 615 | 616 | TableOfContents 617 | 618 | 68188683132943CE00459EB0 619 | 68D230FB13298AA4000E0B9B 620 | 1CD0528F0623707200166675 621 | XCMainBuildResultsModuleGUID 622 | 623 | ToolbarConfiguration 624 | xcode.toolbar.config.buildV3 625 | WindowContentMinSize 626 | 486 300 627 | WindowString 628 | 267 217 500 500 0 0 1280 778 629 | WindowToolGUID 630 | 68188683132943CE00459EB0 631 | WindowToolIsVisible 632 | 633 | 634 | 635 | FirstTimeWindowDisplayed 636 | 637 | Identifier 638 | windowTool.debugger 639 | IsVertical 640 | 641 | Layout 642 | 643 | 644 | Dock 645 | 646 | 647 | ContentConfiguration 648 | 649 | Debugger 650 | 651 | HorizontalSplitView 652 | 653 | _collapsingFrameDimension 654 | 0.0 655 | _indexOfCollapsedView 656 | 0 657 | _percentageOfCollapsedView 658 | 0.0 659 | isCollapsed 660 | yes 661 | sizes 662 | 663 | {{0, 0}, {584, 312}} 664 | {{584, 0}, {696, 312}} 665 | 666 | 667 | VerticalSplitView 668 | 669 | _collapsingFrameDimension 670 | 0.0 671 | _indexOfCollapsedView 672 | 0 673 | _percentageOfCollapsedView 674 | 0.0 675 | isCollapsed 676 | yes 677 | sizes 678 | 679 | {{0, 0}, {1280, 312}} 680 | {{0, 312}, {1280, 300}} 681 | 682 | 683 | 684 | LauncherConfigVersion 685 | 8 686 | PBXProjectModuleGUID 687 | 1C162984064C10D400B95A72 688 | PBXProjectModuleLabel 689 | Debug - GLUTExamples (Underwater) 690 | 691 | GeometryConfiguration 692 | 693 | DebugConsoleVisible 694 | None 695 | DebugConsoleWindowFrame 696 | {{200, 200}, {500, 300}} 697 | DebugSTDIOWindowFrame 698 | {{200, 200}, {500, 300}} 699 | Frame 700 | {{0, 0}, {1280, 612}} 701 | PBXDebugSessionStackFrameViewKey 702 | 703 | DebugVariablesTableConfiguration 704 | 705 | Name 706 | 120 707 | Value 708 | 85 709 | Summary 710 | 466 711 | 712 | Frame 713 | {{584, 0}, {696, 312}} 714 | RubberWindowFrame 715 | 0 125 1280 653 0 0 1280 778 716 | 717 | RubberWindowFrame 718 | 0 125 1280 653 0 0 1280 778 719 | 720 | Module 721 | PBXDebugSessionModule 722 | Proportion 723 | 612pt 724 | 725 | 726 | Proportion 727 | 612pt 728 | 729 | 730 | Name 731 | Debugger 732 | ServiceClasses 733 | 734 | PBXDebugSessionModule 735 | 736 | StatusbarIsVisible 737 | 738 | TableOfContents 739 | 740 | 1CD10A99069EF8BA00B06720 741 | 6867C41C132977C000064A1E 742 | 1C162984064C10D400B95A72 743 | 6867C41D132977C000064A1E 744 | 6867C41E132977C000064A1E 745 | 6867C41F132977C000064A1E 746 | 6867C420132977C000064A1E 747 | 6867C421132977C000064A1E 748 | 749 | ToolbarConfiguration 750 | xcode.toolbar.config.debugV3 751 | WindowString 752 | 0 125 1280 653 0 0 1280 778 753 | WindowToolGUID 754 | 1CD10A99069EF8BA00B06720 755 | WindowToolIsVisible 756 | 757 | 758 | 759 | Identifier 760 | windowTool.find 761 | Layout 762 | 763 | 764 | Dock 765 | 766 | 767 | Dock 768 | 769 | 770 | ContentConfiguration 771 | 772 | PBXProjectModuleGUID 773 | 1CDD528C0622207200134675 774 | PBXProjectModuleLabel 775 | <No Editor> 776 | PBXSplitModuleInNavigatorKey 777 | 778 | Split0 779 | 780 | PBXProjectModuleGUID 781 | 1CD0528D0623707200166675 782 | 783 | SplitCount 784 | 1 785 | 786 | StatusBarVisibility 787 | 1 788 | 789 | GeometryConfiguration 790 | 791 | Frame 792 | {{0, 0}, {781, 167}} 793 | RubberWindowFrame 794 | 62 385 781 470 0 0 1440 878 795 | 796 | Module 797 | PBXNavigatorGroup 798 | Proportion 799 | 781pt 800 | 801 | 802 | Proportion 803 | 50% 804 | 805 | 806 | BecomeActive 807 | 1 808 | ContentConfiguration 809 | 810 | PBXProjectModuleGUID 811 | 1CD0528E0623707200166675 812 | PBXProjectModuleLabel 813 | Project Find 814 | 815 | GeometryConfiguration 816 | 817 | Frame 818 | {{8, 0}, {773, 254}} 819 | RubberWindowFrame 820 | 62 385 781 470 0 0 1440 878 821 | 822 | Module 823 | PBXProjectFindModule 824 | Proportion 825 | 50% 826 | 827 | 828 | Proportion 829 | 428pt 830 | 831 | 832 | Name 833 | Project Find 834 | ServiceClasses 835 | 836 | PBXProjectFindModule 837 | 838 | StatusbarIsVisible 839 | 1 840 | TableOfContents 841 | 842 | 1C530D57069F1CE1000CFCEE 843 | 1C530D58069F1CE1000CFCEE 844 | 1C530D59069F1CE1000CFCEE 845 | 1CDD528C0622207200134675 846 | 1C530D5A069F1CE1000CFCEE 847 | 1CE0B1FE06471DED0097A5F4 848 | 1CD0528E0623707200166675 849 | 850 | WindowString 851 | 62 385 781 470 0 0 1440 878 852 | WindowToolGUID 853 | 1C530D57069F1CE1000CFCEE 854 | WindowToolIsVisible 855 | 0 856 | 857 | 858 | Identifier 859 | MENUSEPARATOR 860 | 861 | 862 | FirstTimeWindowDisplayed 863 | 864 | Identifier 865 | windowTool.debuggerConsole 866 | IsVertical 867 | 868 | Layout 869 | 870 | 871 | Dock 872 | 873 | 874 | BecomeActive 875 | 876 | ContentConfiguration 877 | 878 | PBXProjectModuleGUID 879 | 1C78EAAC065D492600B07095 880 | PBXProjectModuleLabel 881 | Debugger Console 882 | 883 | GeometryConfiguration 884 | 885 | Frame 886 | {{0, 0}, {650, 209}} 887 | RubberWindowFrame 888 | 21 505 650 250 0 0 1280 778 889 | 890 | Module 891 | PBXDebugCLIModule 892 | Proportion 893 | 209pt 894 | 895 | 896 | Proportion 897 | 209pt 898 | 899 | 900 | Name 901 | Debugger Console 902 | ServiceClasses 903 | 904 | PBXDebugCLIModule 905 | 906 | StatusbarIsVisible 907 | 908 | TableOfContents 909 | 910 | 1C78EAAD065D492600B07095 911 | 6867C427132977C200064A1E 912 | 1C78EAAC065D492600B07095 913 | 914 | ToolbarConfiguration 915 | xcode.toolbar.config.consoleV3 916 | WindowString 917 | 21 505 650 250 0 0 1280 778 918 | WindowToolGUID 919 | 1C78EAAD065D492600B07095 920 | WindowToolIsVisible 921 | 922 | 923 | 924 | Identifier 925 | windowTool.snapshots 926 | Layout 927 | 928 | 929 | Dock 930 | 931 | 932 | Module 933 | XCSnapshotModule 934 | Proportion 935 | 100% 936 | 937 | 938 | Proportion 939 | 100% 940 | 941 | 942 | Name 943 | Snapshots 944 | ServiceClasses 945 | 946 | XCSnapshotModule 947 | 948 | StatusbarIsVisible 949 | Yes 950 | ToolbarConfiguration 951 | xcode.toolbar.config.snapshots 952 | WindowString 953 | 315 824 300 550 0 0 1440 878 954 | WindowToolIsVisible 955 | Yes 956 | 957 | 958 | Identifier 959 | windowTool.scm 960 | Layout 961 | 962 | 963 | Dock 964 | 965 | 966 | ContentConfiguration 967 | 968 | PBXProjectModuleGUID 969 | 1C78EAB2065D492600B07095 970 | PBXProjectModuleLabel 971 | <No Editor> 972 | PBXSplitModuleInNavigatorKey 973 | 974 | Split0 975 | 976 | PBXProjectModuleGUID 977 | 1C78EAB3065D492600B07095 978 | 979 | SplitCount 980 | 1 981 | 982 | StatusBarVisibility 983 | 1 984 | 985 | GeometryConfiguration 986 | 987 | Frame 988 | {{0, 0}, {452, 0}} 989 | RubberWindowFrame 990 | 743 379 452 308 0 0 1280 1002 991 | 992 | Module 993 | PBXNavigatorGroup 994 | Proportion 995 | 0pt 996 | 997 | 998 | BecomeActive 999 | 1 1000 | ContentConfiguration 1001 | 1002 | PBXProjectModuleGUID 1003 | 1CD052920623707200166675 1004 | PBXProjectModuleLabel 1005 | SCM 1006 | 1007 | GeometryConfiguration 1008 | 1009 | ConsoleFrame 1010 | {{0, 259}, {452, 0}} 1011 | Frame 1012 | {{0, 7}, {452, 259}} 1013 | RubberWindowFrame 1014 | 743 379 452 308 0 0 1280 1002 1015 | TableConfiguration 1016 | 1017 | Status 1018 | 30 1019 | FileName 1020 | 199 1021 | Path 1022 | 197.0950012207031 1023 | 1024 | TableFrame 1025 | {{0, 0}, {452, 250}} 1026 | 1027 | Module 1028 | PBXCVSModule 1029 | Proportion 1030 | 262pt 1031 | 1032 | 1033 | Proportion 1034 | 266pt 1035 | 1036 | 1037 | Name 1038 | SCM 1039 | ServiceClasses 1040 | 1041 | PBXCVSModule 1042 | 1043 | StatusbarIsVisible 1044 | 1 1045 | TableOfContents 1046 | 1047 | 1C78EAB4065D492600B07095 1048 | 1C78EAB5065D492600B07095 1049 | 1C78EAB2065D492600B07095 1050 | 1CD052920623707200166675 1051 | 1052 | ToolbarConfiguration 1053 | xcode.toolbar.config.scm 1054 | WindowString 1055 | 743 379 452 308 0 0 1280 1002 1056 | 1057 | 1058 | Identifier 1059 | windowTool.breakpoints 1060 | IsVertical 1061 | 0 1062 | Layout 1063 | 1064 | 1065 | Dock 1066 | 1067 | 1068 | BecomeActive 1069 | 1 1070 | ContentConfiguration 1071 | 1072 | PBXBottomSmartGroupGIDs 1073 | 1074 | 1C77FABC04509CD000000102 1075 | 1076 | PBXProjectModuleGUID 1077 | 1CE0B1FE06471DED0097A5F4 1078 | PBXProjectModuleLabel 1079 | Files 1080 | PBXProjectStructureProvided 1081 | no 1082 | PBXSmartGroupTreeModuleColumnData 1083 | 1084 | PBXSmartGroupTreeModuleColumnWidthsKey 1085 | 1086 | 168 1087 | 1088 | PBXSmartGroupTreeModuleColumnsKey_v4 1089 | 1090 | MainColumn 1091 | 1092 | 1093 | PBXSmartGroupTreeModuleOutlineStateKey_v7 1094 | 1095 | PBXSmartGroupTreeModuleOutlineStateExpansionKey 1096 | 1097 | 1C77FABC04509CD000000102 1098 | 1099 | PBXSmartGroupTreeModuleOutlineStateSelectionKey 1100 | 1101 | 1102 | 0 1103 | 1104 | 1105 | PBXSmartGroupTreeModuleOutlineStateVisibleRectKey 1106 | {{0, 0}, {168, 350}} 1107 | 1108 | PBXTopSmartGroupGIDs 1109 | 1110 | XCIncludePerspectivesSwitch 1111 | 0 1112 | 1113 | GeometryConfiguration 1114 | 1115 | Frame 1116 | {{0, 0}, {185, 368}} 1117 | GroupTreeTableConfiguration 1118 | 1119 | MainColumn 1120 | 168 1121 | 1122 | RubberWindowFrame 1123 | 315 424 744 409 0 0 1440 878 1124 | 1125 | Module 1126 | PBXSmartGroupTreeModule 1127 | Proportion 1128 | 185pt 1129 | 1130 | 1131 | ContentConfiguration 1132 | 1133 | PBXProjectModuleGUID 1134 | 1CA1AED706398EBD00589147 1135 | PBXProjectModuleLabel 1136 | Detail 1137 | 1138 | GeometryConfiguration 1139 | 1140 | Frame 1141 | {{190, 0}, {554, 368}} 1142 | RubberWindowFrame 1143 | 315 424 744 409 0 0 1440 878 1144 | 1145 | Module 1146 | XCDetailModule 1147 | Proportion 1148 | 554pt 1149 | 1150 | 1151 | Proportion 1152 | 368pt 1153 | 1154 | 1155 | MajorVersion 1156 | 3 1157 | MinorVersion 1158 | 0 1159 | Name 1160 | Breakpoints 1161 | ServiceClasses 1162 | 1163 | PBXSmartGroupTreeModule 1164 | XCDetailModule 1165 | 1166 | StatusbarIsVisible 1167 | 1 1168 | TableOfContents 1169 | 1170 | 1CDDB66807F98D9800BB5817 1171 | 1CDDB66907F98D9800BB5817 1172 | 1CE0B1FE06471DED0097A5F4 1173 | 1CA1AED706398EBD00589147 1174 | 1175 | ToolbarConfiguration 1176 | xcode.toolbar.config.breakpointsV3 1177 | WindowString 1178 | 315 424 744 409 0 0 1440 878 1179 | WindowToolGUID 1180 | 1CDDB66807F98D9800BB5817 1181 | WindowToolIsVisible 1182 | 1 1183 | 1184 | 1185 | Identifier 1186 | windowTool.debugAnimator 1187 | Layout 1188 | 1189 | 1190 | Dock 1191 | 1192 | 1193 | Module 1194 | PBXNavigatorGroup 1195 | Proportion 1196 | 100% 1197 | 1198 | 1199 | Proportion 1200 | 100% 1201 | 1202 | 1203 | Name 1204 | Debug Visualizer 1205 | ServiceClasses 1206 | 1207 | PBXNavigatorGroup 1208 | 1209 | StatusbarIsVisible 1210 | 1 1211 | ToolbarConfiguration 1212 | xcode.toolbar.config.debugAnimatorV3 1213 | WindowString 1214 | 100 100 700 500 0 0 1280 1002 1215 | 1216 | 1217 | Identifier 1218 | windowTool.bookmarks 1219 | Layout 1220 | 1221 | 1222 | Dock 1223 | 1224 | 1225 | Module 1226 | PBXBookmarksModule 1227 | Proportion 1228 | 100% 1229 | 1230 | 1231 | Proportion 1232 | 100% 1233 | 1234 | 1235 | Name 1236 | Bookmarks 1237 | ServiceClasses 1238 | 1239 | PBXBookmarksModule 1240 | 1241 | StatusbarIsVisible 1242 | 0 1243 | WindowString 1244 | 538 42 401 187 0 0 1280 1002 1245 | 1246 | 1247 | Identifier 1248 | windowTool.projectFormatConflicts 1249 | Layout 1250 | 1251 | 1252 | Dock 1253 | 1254 | 1255 | Module 1256 | XCProjectFormatConflictsModule 1257 | Proportion 1258 | 100% 1259 | 1260 | 1261 | Proportion 1262 | 100% 1263 | 1264 | 1265 | Name 1266 | Project Format Conflicts 1267 | ServiceClasses 1268 | 1269 | XCProjectFormatConflictsModule 1270 | 1271 | StatusbarIsVisible 1272 | 0 1273 | WindowContentMinSize 1274 | 450 300 1275 | WindowString 1276 | 50 850 472 307 0 0 1440 877 1277 | 1278 | 1279 | Identifier 1280 | windowTool.classBrowser 1281 | Layout 1282 | 1283 | 1284 | Dock 1285 | 1286 | 1287 | BecomeActive 1288 | 1 1289 | ContentConfiguration 1290 | 1291 | OptionsSetName 1292 | Hierarchy, all classes 1293 | PBXProjectModuleGUID 1294 | 1CA6456E063B45B4001379D8 1295 | PBXProjectModuleLabel 1296 | Class Browser - NSObject 1297 | 1298 | GeometryConfiguration 1299 | 1300 | ClassesFrame 1301 | {{0, 0}, {374, 96}} 1302 | ClassesTreeTableConfiguration 1303 | 1304 | PBXClassNameColumnIdentifier 1305 | 208 1306 | PBXClassBookColumnIdentifier 1307 | 22 1308 | 1309 | Frame 1310 | {{0, 0}, {630, 331}} 1311 | MembersFrame 1312 | {{0, 105}, {374, 395}} 1313 | MembersTreeTableConfiguration 1314 | 1315 | PBXMemberTypeIconColumnIdentifier 1316 | 22 1317 | PBXMemberNameColumnIdentifier 1318 | 216 1319 | PBXMemberTypeColumnIdentifier 1320 | 97 1321 | PBXMemberBookColumnIdentifier 1322 | 22 1323 | 1324 | PBXModuleWindowStatusBarHidden2 1325 | 1 1326 | RubberWindowFrame 1327 | 385 179 630 352 0 0 1440 878 1328 | 1329 | Module 1330 | PBXClassBrowserModule 1331 | Proportion 1332 | 332pt 1333 | 1334 | 1335 | Proportion 1336 | 332pt 1337 | 1338 | 1339 | Name 1340 | Class Browser 1341 | ServiceClasses 1342 | 1343 | PBXClassBrowserModule 1344 | 1345 | StatusbarIsVisible 1346 | 0 1347 | TableOfContents 1348 | 1349 | 1C0AD2AF069F1E9B00FABCE6 1350 | 1C0AD2B0069F1E9B00FABCE6 1351 | 1CA6456E063B45B4001379D8 1352 | 1353 | ToolbarConfiguration 1354 | xcode.toolbar.config.classbrowser 1355 | WindowString 1356 | 385 179 630 352 0 0 1440 878 1357 | WindowToolGUID 1358 | 1C0AD2AF069F1E9B00FABCE6 1359 | WindowToolIsVisible 1360 | 0 1361 | 1362 | 1363 | Identifier 1364 | windowTool.refactoring 1365 | IncludeInToolsMenu 1366 | 0 1367 | Layout 1368 | 1369 | 1370 | Dock 1371 | 1372 | 1373 | BecomeActive 1374 | 1 1375 | GeometryConfiguration 1376 | 1377 | Frame 1378 | {0, 0}, {500, 335} 1379 | RubberWindowFrame 1380 | {0, 0}, {500, 335} 1381 | 1382 | Module 1383 | XCRefactoringModule 1384 | Proportion 1385 | 100% 1386 | 1387 | 1388 | Proportion 1389 | 100% 1390 | 1391 | 1392 | Name 1393 | Refactoring 1394 | ServiceClasses 1395 | 1396 | XCRefactoringModule 1397 | 1398 | WindowString 1399 | 200 200 500 356 0 0 1920 1200 1400 | 1401 | 1402 | 1403 | 1404 | --------------------------------------------------------------------------------