Latest 0.2.3
License BSD
Platforms ios 8.0, requires ARC

MadSqlite iOS Objective-C Framework

Build Status

MadSqlite is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'MadSqlite', '~> 0.2.3'

or bleeding edge:

pod 'MadSqlite', :git => '', :submodules => true


// Open / create database
id <MADDatabase> md = [MADSqliteFactory databaseNamed:@"mydb"];
[md exec:@"CREATE TABLE location_table(name TEXT, latitude REAL, longitude REAL, image BLOB);"];

// Insert into database
id <MADContentValues> cv = [MADSqliteFactory contentValues];
[cv putString:@"name" withValue:@"Cheshire Cat"];
[cv putReal:@"latitude" withValue:@(51.2414945)];
[cv putReal:@"longitude" withValue:@(-0.6354629)];
NSData *data = UIImagePNGRepresentation([UIImage imageNamed:@"Cheshire Cat"]);
[cv putBlob:@"image" withValue:data];
[md insert:@"location_table" withValues:cv];

// Query database
id <MADQuery> query = [md query:@"SELECT name, latitude, longitude FROM location_table WHERE name=?"
                       withArgs:@[@"Cheshire Cat"]];
if ([query moveToFirst]) {
    while (![query isAfterLast]) {
        NSString *name = [query getString:0];
        NSNumber *latitude = [query getReal:1];
        NSNumber *longitude = [query getReal:2];
        NSLog(@"name:%@ latitude:%@ longitude:%@", name, latitude, longitude);
        [query moveToNext];

Latest podspec

    "name": "MadSqlite",
    "version": "0.2.3",
    "summary": "A simple Sqlite Abstraction",
    "description": "A simple Sqlite Abstraction with FTS5 and R*Tree enabled",
    "homepage": "",
    "license": {
        "type": "BSD",
        "file": ""
    "authors": {
        "William Kamp": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.2.3",
        "submodules": true
    "platforms": {
        "ios": "8.0"
    "source_files": [
    "private_header_files": [
    "requires_arc": true,
    "libraries": "c++",
    "xcconfig": {
        "CLANG_CXX_LIBRARY": "libc++",

Pin It on Pinterest

Share This