GRDBDemoiOS7

This commit is contained in:
Gwendal Roué committed 2015-10-14 15:59:08 +02:00
1 parent aab146ad23
commit 40fcbcd680
14 files changed
+1087 -1

No files matched your search

@@ -0,0 +1,526 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
562FF9951BCE8FA400759400 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9941BCE8FA400759400 /* AppDelegate.swift */; };
562FF9971BCE8FA400759400 /* PersonsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9961BCE8FA400759400 /* PersonsViewController.swift */; };
562FF99A1BCE8FA400759400 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 562FF9981BCE8FA400759400 /* Main.storyboard */; };
562FF99C1BCE8FA400759400 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 562FF99B1BCE8FA400759400 /* Assets.xcassets */; };
562FF99F1BCE8FA400759400 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 562FF99D1BCE8FA400759400 /* LaunchScreen.storyboard */; };
562FF9CD1BCE902400759400 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9AA1BCE902400759400 /* Configuration.swift */; settings = {ASSET_TAGS = (); }; };
562FF9CE1BCE902400759400 /* Database.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9AB1BCE902400759400 /* Database.swift */; settings = {ASSET_TAGS = (); }; };
562FF9CF1BCE902400759400 /* DatabaseChanges.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9AC1BCE902400759400 /* DatabaseChanges.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D01BCE902400759400 /* DatabaseError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9AD1BCE902400759400 /* DatabaseError.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D11BCE902400759400 /* DatabaseQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9AE1BCE902400759400 /* DatabaseQueue.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D21BCE902400759400 /* DatabaseValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9AF1BCE902400759400 /* DatabaseValue.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D31BCE902400759400 /* DatabaseTableMapping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B11BCE902400759400 /* DatabaseTableMapping.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D41BCE902400759400 /* DatabaseValueConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B21BCE902400759400 /* DatabaseValueConvertible.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D51BCE902400759400 /* RowConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B31BCE902400759400 /* RowConvertible.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D61BCE902400759400 /* SQLiteStatementConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B41BCE902400759400 /* SQLiteStatementConvertible.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D71BCE902400759400 /* Row.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B51BCE902400759400 /* Row.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D81BCE902400759400 /* SelectStatement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B61BCE902400759400 /* SelectStatement.swift */; settings = {ASSET_TAGS = (); }; };
562FF9D91BCE902400759400 /* Statement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B71BCE902400759400 /* Statement.swift */; settings = {ASSET_TAGS = (); }; };
562FF9DA1BCE902400759400 /* StatementArguments.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B81BCE902400759400 /* StatementArguments.swift */; settings = {ASSET_TAGS = (); }; };
562FF9DB1BCE902400759400 /* UpdateStatement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9B91BCE902400759400 /* UpdateStatement.swift */; settings = {ASSET_TAGS = (); }; };
562FF9DC1BCE902400759400 /* DatabaseDateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9BB1BCE902400759400 /* DatabaseDateComponents.swift */; settings = {ASSET_TAGS = (); }; };
562FF9DD1BCE902400759400 /* NSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9BC1BCE902400759400 /* NSData.swift */; settings = {ASSET_TAGS = (); }; };
562FF9DE1BCE902400759400 /* NSDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9BD1BCE902400759400 /* NSDate.swift */; settings = {ASSET_TAGS = (); }; };
562FF9DF1BCE902400759400 /* NSNull.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9BE1BCE902400759400 /* NSNull.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E01BCE902400759400 /* NSNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9BF1BCE902400759400 /* NSNumber.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E11BCE902400759400 /* NSString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C01BCE902400759400 /* NSString.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E21BCE902400759400 /* NSURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C11BCE902400759400 /* NSURL.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E31BCE902400759400 /* Row+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C21BCE902400759400 /* Row+Foundation.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E41BCE902400759400 /* RowConvertible+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C31BCE902400759400 /* RowConvertible+Foundation.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E51BCE902400759400 /* StatementArguments+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C41BCE902400759400 /* StatementArguments+Foundation.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E61BCE902400759400 /* DatabaseMigrator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C61BCE902400759400 /* DatabaseMigrator.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E71BCE902400759400 /* DatabaseStorable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C81BCE902400759400 /* DatabaseStorable.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E81BCE902400759400 /* Record.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9C91BCE902400759400 /* Record.swift */; settings = {ASSET_TAGS = (); }; };
562FF9E91BCE902400759400 /* RawRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9CB1BCE902400759400 /* RawRepresentable.swift */; settings = {ASSET_TAGS = (); }; };
562FF9EA1BCE902400759400 /* StandardLibraryTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9CC1BCE902400759400 /* StandardLibraryTypes.swift */; settings = {ASSET_TAGS = (); }; };
562FF9EC1BCE903D00759400 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 562FF9EB1BCE903D00759400 /* libsqlite3.tbd */; };
562FF9EF1BCE912C00759400 /* PersonEditionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9EE1BCE912C00759400 /* PersonEditionViewController.swift */; settings = {ASSET_TAGS = (); }; };
562FF9F21BCE914E00759400 /* Person.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9F11BCE914E00759400 /* Person.swift */; settings = {ASSET_TAGS = (); }; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
562FF9911BCE8FA400759400 /* GRDBDemoiOS7.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GRDBDemoiOS7.app; sourceTree = BUILT_PRODUCTS_DIR; };
562FF9941BCE8FA400759400 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
562FF9961BCE8FA400759400 /* PersonsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonsViewController.swift; sourceTree = "<group>"; };
562FF9991BCE8FA400759400 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
562FF99B1BCE8FA400759400 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
562FF99E1BCE8FA400759400 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
562FF9A01BCE8FA400759400 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
562FF9AA1BCE902400759400 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; };
562FF9AB1BCE902400759400 /* Database.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Database.swift; sourceTree = "<group>"; };
562FF9AC1BCE902400759400 /* DatabaseChanges.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseChanges.swift; sourceTree = "<group>"; };
562FF9AD1BCE902400759400 /* DatabaseError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseError.swift; sourceTree = "<group>"; };
562FF9AE1BCE902400759400 /* DatabaseQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseQueue.swift; sourceTree = "<group>"; };
562FF9AF1BCE902400759400 /* DatabaseValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseValue.swift; sourceTree = "<group>"; };
562FF9B11BCE902400759400 /* DatabaseTableMapping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseTableMapping.swift; sourceTree = "<group>"; };
562FF9B21BCE902400759400 /* DatabaseValueConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseValueConvertible.swift; sourceTree = "<group>"; };
562FF9B31BCE902400759400 /* RowConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowConvertible.swift; sourceTree = "<group>"; };
562FF9B41BCE902400759400 /* SQLiteStatementConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLiteStatementConvertible.swift; sourceTree = "<group>"; };
562FF9B51BCE902400759400 /* Row.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Row.swift; sourceTree = "<group>"; };
562FF9B61BCE902400759400 /* SelectStatement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectStatement.swift; sourceTree = "<group>"; };
562FF9B71BCE902400759400 /* Statement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Statement.swift; sourceTree = "<group>"; };
562FF9B81BCE902400759400 /* StatementArguments.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatementArguments.swift; sourceTree = "<group>"; };
562FF9B91BCE902400759400 /* UpdateStatement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateStatement.swift; sourceTree = "<group>"; };
562FF9BB1BCE902400759400 /* DatabaseDateComponents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseDateComponents.swift; sourceTree = "<group>"; };
562FF9BC1BCE902400759400 /* NSData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSData.swift; sourceTree = "<group>"; };
562FF9BD1BCE902400759400 /* NSDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSDate.swift; sourceTree = "<group>"; };
562FF9BE1BCE902400759400 /* NSNull.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSNull.swift; sourceTree = "<group>"; };
562FF9BF1BCE902400759400 /* NSNumber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSNumber.swift; sourceTree = "<group>"; };
562FF9C01BCE902400759400 /* NSString.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSString.swift; sourceTree = "<group>"; };
562FF9C11BCE902400759400 /* NSURL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSURL.swift; sourceTree = "<group>"; };
562FF9C21BCE902400759400 /* Row+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Row+Foundation.swift"; sourceTree = "<group>"; };
562FF9C31BCE902400759400 /* RowConvertible+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "RowConvertible+Foundation.swift"; sourceTree = "<group>"; };
562FF9C41BCE902400759400 /* StatementArguments+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "StatementArguments+Foundation.swift"; sourceTree = "<group>"; };
562FF9C61BCE902400759400 /* DatabaseMigrator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseMigrator.swift; sourceTree = "<group>"; };
562FF9C81BCE902400759400 /* DatabaseStorable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseStorable.swift; sourceTree = "<group>"; };
562FF9C91BCE902400759400 /* Record.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Record.swift; sourceTree = "<group>"; };
562FF9CB1BCE902400759400 /* RawRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawRepresentable.swift; sourceTree = "<group>"; };
562FF9CC1BCE902400759400 /* StandardLibraryTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StandardLibraryTypes.swift; sourceTree = "<group>"; };
562FF9EB1BCE903D00759400 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
562FF9EE1BCE912C00759400 /* PersonEditionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersonEditionViewController.swift; sourceTree = "<group>"; };
562FF9F11BCE914E00759400 /* Person.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Person.swift; sourceTree = "<group>"; };
562FF9F41BCE930C00759400 /* GRDBDemoiOS7-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GRDBDemoiOS7-Bridging-Header.h"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
562FF98E1BCE8FA400759400 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
562FF9EC1BCE903D00759400 /* libsqlite3.tbd in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
562FF9881BCE8FA400759400 = {
isa = PBXGroup;
children = (
562FF9931BCE8FA400759400 /* GRDBDemoiOS7 */,
562FF9921BCE8FA400759400 /* Products */,
);
sourceTree = "<group>";
};
562FF9921BCE8FA400759400 /* Products */ = {
isa = PBXGroup;
children = (
562FF9911BCE8FA400759400 /* GRDBDemoiOS7.app */,
);
name = Products;
sourceTree = "<group>";
};
562FF9931BCE8FA400759400 /* GRDBDemoiOS7 */ = {
isa = PBXGroup;
children = (
562FF9941BCE8FA400759400 /* AppDelegate.swift */,
562FF9F01BCE913900759400 /* Controllers */,
562FF9F31BCE915B00759400 /* Models */,
562FF9A61BCE8FB000759400 /* Resources */,
562FF9ED1BCE904D00759400 /* Libraries */,
562FF9A71BCE8FB600759400 /* Supporting Files */,
);
path = GRDBDemoiOS7;
sourceTree = "<group>";
};
562FF9A61BCE8FB000759400 /* Resources */ = {
isa = PBXGroup;
children = (
562FF9981BCE8FA400759400 /* Main.storyboard */,
562FF99B1BCE8FA400759400 /* Assets.xcassets */,
562FF99D1BCE8FA400759400 /* LaunchScreen.storyboard */,
);
name = Resources;
sourceTree = "<group>";
};
562FF9A71BCE8FB600759400 /* Supporting Files */ = {
isa = PBXGroup;
children = (
562FF9A01BCE8FA400759400 /* Info.plist */,
562FF9F41BCE930C00759400 /* GRDBDemoiOS7-Bridging-Header.h */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
562FF9A81BCE900100759400 /* GRDB */ = {
isa = PBXGroup;
children = (
562FF9A91BCE902400759400 /* Core */,
562FF9BA1BCE902400759400 /* Foundation */,
562FF9C51BCE902400759400 /* Migrations */,
562FF9C71BCE902400759400 /* Record */,
562FF9CA1BCE902400759400 /* Swift */,
);
name = GRDB;
path = ../../GRDB;
sourceTree = SOURCE_ROOT;
};
562FF9A91BCE902400759400 /* Core */ = {
isa = PBXGroup;
children = (
562FF9AA1BCE902400759400 /* Configuration.swift */,
562FF9AB1BCE902400759400 /* Database.swift */,
562FF9AC1BCE902400759400 /* DatabaseChanges.swift */,
562FF9AD1BCE902400759400 /* DatabaseError.swift */,
562FF9AE1BCE902400759400 /* DatabaseQueue.swift */,
562FF9AF1BCE902400759400 /* DatabaseValue.swift */,
562FF9B01BCE902400759400 /* Protocols */,
562FF9B51BCE902400759400 /* Row.swift */,
562FF9B61BCE902400759400 /* SelectStatement.swift */,
562FF9B71BCE902400759400 /* Statement.swift */,
562FF9B81BCE902400759400 /* StatementArguments.swift */,
562FF9B91BCE902400759400 /* UpdateStatement.swift */,
);
path = Core;
sourceTree = "<group>";
};
562FF9B01BCE902400759400 /* Protocols */ = {
isa = PBXGroup;
children = (
562FF9B11BCE902400759400 /* DatabaseTableMapping.swift */,
562FF9B21BCE902400759400 /* DatabaseValueConvertible.swift */,
562FF9B31BCE902400759400 /* RowConvertible.swift */,
562FF9B41BCE902400759400 /* SQLiteStatementConvertible.swift */,
);
path = Protocols;
sourceTree = "<group>";
};
562FF9BA1BCE902400759400 /* Foundation */ = {
isa = PBXGroup;
children = (
562FF9BB1BCE902400759400 /* DatabaseDateComponents.swift */,
562FF9BC1BCE902400759400 /* NSData.swift */,
562FF9BD1BCE902400759400 /* NSDate.swift */,
562FF9BE1BCE902400759400 /* NSNull.swift */,
562FF9BF1BCE902400759400 /* NSNumber.swift */,
562FF9C01BCE902400759400 /* NSString.swift */,
562FF9C11BCE902400759400 /* NSURL.swift */,
562FF9C21BCE902400759400 /* Row+Foundation.swift */,
562FF9C31BCE902400759400 /* RowConvertible+Foundation.swift */,
562FF9C41BCE902400759400 /* StatementArguments+Foundation.swift */,
);
path = Foundation;
sourceTree = "<group>";
};
562FF9C51BCE902400759400 /* Migrations */ = {
isa = PBXGroup;
children = (
562FF9C61BCE902400759400 /* DatabaseMigrator.swift */,
);
path = Migrations;
sourceTree = "<group>";
};
562FF9C71BCE902400759400 /* Record */ = {
isa = PBXGroup;
children = (
562FF9C81BCE902400759400 /* DatabaseStorable.swift */,
562FF9C91BCE902400759400 /* Record.swift */,
);
path = Record;
sourceTree = "<group>";
};
562FF9CA1BCE902400759400 /* Swift */ = {
isa = PBXGroup;
children = (
562FF9CB1BCE902400759400 /* RawRepresentable.swift */,
562FF9CC1BCE902400759400 /* StandardLibraryTypes.swift */,
);
path = Swift;
sourceTree = "<group>";
};
562FF9ED1BCE904D00759400 /* Libraries */ = {
isa = PBXGroup;
children = (
562FF9EB1BCE903D00759400 /* libsqlite3.tbd */,
562FF9A81BCE900100759400 /* GRDB */,
);
name = Libraries;
sourceTree = "<group>";
};
562FF9F01BCE913900759400 /* Controllers */ = {
isa = PBXGroup;
children = (
562FF9EE1BCE912C00759400 /* PersonEditionViewController.swift */,
562FF9961BCE8FA400759400 /* PersonsViewController.swift */,
);
name = Controllers;
sourceTree = "<group>";
};
562FF9F31BCE915B00759400 /* Models */ = {
isa = PBXGroup;
children = (
562FF9F11BCE914E00759400 /* Person.swift */,
);
name = Models;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
562FF9901BCE8FA400759400 /* GRDBDemoiOS7 */ = {
isa = PBXNativeTarget;
buildConfigurationList = 562FF9A31BCE8FA400759400 /* Build configuration list for PBXNativeTarget "GRDBDemoiOS7" */;
buildPhases = (
562FF98D1BCE8FA400759400 /* Sources */,
562FF98E1BCE8FA400759400 /* Frameworks */,
562FF98F1BCE8FA400759400 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = GRDBDemoiOS7;
productName = GRDBDemoiOS7;
productReference = 562FF9911BCE8FA400759400 /* GRDBDemoiOS7.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
562FF9891BCE8FA400759400 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = "Gwendal Roué";
TargetAttributes = {
562FF9901BCE8FA400759400 = {
CreatedOnToolsVersion = 7.0;
};
};
};
buildConfigurationList = 562FF98C1BCE8FA400759400 /* Build configuration list for PBXProject "GRDBDemoiOS7" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 562FF9881BCE8FA400759400;
productRefGroup = 562FF9921BCE8FA400759400 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
562FF9901BCE8FA400759400 /* GRDBDemoiOS7 */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
562FF98F1BCE8FA400759400 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
562FF99F1BCE8FA400759400 /* LaunchScreen.storyboard in Resources */,
562FF99C1BCE8FA400759400 /* Assets.xcassets in Resources */,
562FF99A1BCE8FA400759400 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
562FF98D1BCE8FA400759400 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
562FF9D21BCE902400759400 /* DatabaseValue.swift in Sources */,
562FF9CD1BCE902400759400 /* Configuration.swift in Sources */,
562FF9E81BCE902400759400 /* Record.swift in Sources */,
562FF9D41BCE902400759400 /* DatabaseValueConvertible.swift in Sources */,
562FF9E31BCE902400759400 /* Row+Foundation.swift in Sources */,
562FF9D81BCE902400759400 /* SelectStatement.swift in Sources */,
562FF9D71BCE902400759400 /* Row.swift in Sources */,
562FF9EF1BCE912C00759400 /* PersonEditionViewController.swift in Sources */,
562FF9971BCE8FA400759400 /* PersonsViewController.swift in Sources */,
562FF9CE1BCE902400759400 /* Database.swift in Sources */,
562FF9E01BCE902400759400 /* NSNumber.swift in Sources */,
562FF9CF1BCE902400759400 /* DatabaseChanges.swift in Sources */,
562FF9E51BCE902400759400 /* StatementArguments+Foundation.swift in Sources */,
562FF9D61BCE902400759400 /* SQLiteStatementConvertible.swift in Sources */,
562FF9F21BCE914E00759400 /* Person.swift in Sources */,
562FF9D91BCE902400759400 /* Statement.swift in Sources */,
562FF9E91BCE902400759400 /* RawRepresentable.swift in Sources */,
562FF9951BCE8FA400759400 /* AppDelegate.swift in Sources */,
562FF9EA1BCE902400759400 /* StandardLibraryTypes.swift in Sources */,
562FF9D31BCE902400759400 /* DatabaseTableMapping.swift in Sources */,
562FF9DD1BCE902400759400 /* NSData.swift in Sources */,
562FF9D11BCE902400759400 /* DatabaseQueue.swift in Sources */,
562FF9DE1BCE902400759400 /* NSDate.swift in Sources */,
562FF9E41BCE902400759400 /* RowConvertible+Foundation.swift in Sources */,
562FF9E61BCE902400759400 /* DatabaseMigrator.swift in Sources */,
562FF9D01BCE902400759400 /* DatabaseError.swift in Sources */,
562FF9DB1BCE902400759400 /* UpdateStatement.swift in Sources */,
562FF9E21BCE902400759400 /* NSURL.swift in Sources */,
562FF9DA1BCE902400759400 /* StatementArguments.swift in Sources */,
562FF9E71BCE902400759400 /* DatabaseStorable.swift in Sources */,
562FF9E11BCE902400759400 /* NSString.swift in Sources */,
562FF9DC1BCE902400759400 /* DatabaseDateComponents.swift in Sources */,
562FF9DF1BCE902400759400 /* NSNull.swift in Sources */,
562FF9D51BCE902400759400 /* RowConvertible.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
562FF9981BCE8FA400759400 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
562FF9991BCE8FA400759400 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
562FF99D1BCE8FA400759400 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
562FF99E1BCE8FA400759400 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
562FF9A11BCE8FA400759400 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
562FF9A21BCE8FA400759400 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
562FF9A41BCE8FA400759400 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = GRDBDemoiOS7/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS7;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "GRDBDemoiOS7/GRDBDemoiOS7-Bridging-Header.h";
};
name = Debug;
};
562FF9A51BCE8FA400759400 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = GRDBDemoiOS7/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRDBDemoiOS7;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "GRDBDemoiOS7/GRDBDemoiOS7-Bridging-Header.h";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
562FF98C1BCE8FA400759400 /* Build configuration list for PBXProject "GRDBDemoiOS7" */ = {
isa = XCConfigurationList;
buildConfigurations = (
562FF9A11BCE8FA400759400 /* Debug */,
562FF9A21BCE8FA400759400 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
562FF9A31BCE8FA400759400 /* Build configuration list for PBXNativeTarget "GRDBDemoiOS7" */ = {
isa = XCConfigurationList;
buildConfigurations = (
562FF9A41BCE8FA400759400 /* Debug */,
562FF9A51BCE8FA400759400 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 562FF9891BCE8FA400759400 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:GRDBDemoiOS7.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,43 @@
import UIKit
// The shared database queue, stored in a global.
// It is created in AppDelegate.application(_:didFinishLaunchingWithOptions:)
var dbQueue: DatabaseQueue!
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Connect to the database
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first! as NSString
let databasePath = documentsPath.stringByAppendingPathComponent("db.sqlite")
dbQueue = try! DatabaseQueue(path: databasePath)
// Use DatabaseMigrator to setup the database
var migrator = DatabaseMigrator()
migrator.registerMigration("createPersons") { db in
try db.execute(
"CREATE TABLE persons (" +
"id INTEGER PRIMARY KEY, " +
"firstName TEXT, " +
"lastName TEXT " +
")")
}
migrator.registerMigration("addPersons") { db in
try Person(firstName: "Arthur", lastName: "Miller").insert(db)
try Person(firstName: "Barbara", lastName: "Streisand").insert(db)
try Person(firstName: "Cinderella").insert(db)
}
try! migrator.migrate(dbQueue)
return true
}
}
@@ -0,0 +1,38 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Xbj-yc-Aiu">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<scenes>
<!--Persons View Controller-->
<scene sceneID="1fE-hv-cjH">
<objects>
<tableViewController id="ynz-7l-fNg" customClass="PersonsViewController" customModule="GRDBDemoiOS7" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="wb6-9X-0tl">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="0eG-T5-kyh" style="IBUITableViewCellStyleDefault" id="eJm-gh-sbD">
<rect key="frame" x="0.0" y="92" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="eJm-gh-sbD" id="njP-8B-rhM">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0eG-T5-kyh">
<rect key="frame" x="15" y="0.0" width="570" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="ynz-7l-fNg" id="5FA-Zc-cZO"/>
<outlet property="delegate" destination="ynz-7l-fNg" id="B8Y-qi-fJZ"/>
</connections>
</tableView>
<toolbarItems/>
<navigationItem key="navigationItem" id="gMJ-R9-ZaQ">
<barButtonItem key="rightBarButtonItem" systemItem="add" id="XY0-Dc-M7c">
<connections>
<segue destination="oMH-Sb-bab" kind="presentation" identifier="editNewPerson" id="i19-Bf-uNJ"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="0kz-GI-OO0" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1195" y="377"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="cvq-JR-nHN">
<objects>
<navigationController id="Xbj-yc-Aiu" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="Hgn-6S-1iz">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="ynz-7l-fNg" kind="relationship" relationship="rootViewController" id="C4a-4A-4Md"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="OyF-YK-p9J" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="375" y="377"/>
</scene>
<!--Person Edition View Controller-->
<scene sceneID="nA8-Ek-eRe">
<objects>
<tableViewController id="8yj-TG-7Iv" customClass="PersonEditionViewController" customModule="GRDBDemoiOS7" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="jhE-wh-IDm">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection id="9vV-wM-aZ9">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="oKc-Vh-GAg">
<rect key="frame" x="0.0" y="99" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oKc-Vh-GAg" id="EWB-Ks-FwX">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="eF9-yN-ByV">
<rect key="frame" x="106" y="11" width="479" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" spellCheckingType="no"/>
<connections>
<outlet property="delegate" destination="8yj-TG-7Iv" id="tG8-8g-5h8"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="First Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xbk-eb-6vS">
<rect key="frame" x="15" y="11" width="83" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.1137254902" green="0.47843137250000001" blue="0.98039215690000003" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="eF9-yN-ByV" secondAttribute="trailing" constant="15" id="5YN-K6-y1e"/>
<constraint firstItem="xbk-eb-6vS" firstAttribute="leading" secondItem="EWB-Ks-FwX" secondAttribute="leading" constant="15" id="6ZF-52-FFn"/>
<constraint firstItem="xbk-eb-6vS" firstAttribute="centerY" secondItem="EWB-Ks-FwX" secondAttribute="centerY" id="9zo-vh-Z4q"/>
<constraint firstItem="eF9-yN-ByV" firstAttribute="leading" secondItem="xbk-eb-6vS" secondAttribute="trailing" constant="8" symbolic="YES" id="aKR-sh-Dh7"/>
<constraint firstItem="eF9-yN-ByV" firstAttribute="centerY" secondItem="EWB-Ks-FwX" secondAttribute="centerY" id="kqk-6N-RLq"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="jUE-io-HLU">
<rect key="frame" x="0.0" y="143" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jUE-io-HLU" id="utc-hw-ReT">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="D1U-mQ-lvp">
<rect key="frame" x="105" y="11" width="480" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" autocorrectionType="no" spellCheckingType="no"/>
<connections>
<outlet property="delegate" destination="8yj-TG-7Iv" id="2pv-xY-VtW"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="Last Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oYd-Lu-Kgd">
<rect key="frame" x="15" y="11" width="82" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.1137254902" green="0.47843137250000001" blue="0.98039215690000003" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="D1U-mQ-lvp" firstAttribute="leading" secondItem="oYd-Lu-Kgd" secondAttribute="trailing" constant="8" symbolic="YES" id="FHD-Pe-EkI"/>
<constraint firstItem="oYd-Lu-Kgd" firstAttribute="centerY" secondItem="utc-hw-ReT" secondAttribute="centerY" id="Kdt-DU-1us"/>
<constraint firstItem="D1U-mQ-lvp" firstAttribute="centerY" secondItem="utc-hw-ReT" secondAttribute="centerY" id="RVU-rE-8Aq"/>
<constraint firstItem="oYd-Lu-Kgd" firstAttribute="leading" secondItem="utc-hw-ReT" secondAttribute="leading" constant="15" id="Wlm-uX-s7l"/>
<constraint firstAttribute="trailing" secondItem="D1U-mQ-lvp" secondAttribute="trailing" constant="15" id="fs6-Mj-Cug"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="8yj-TG-7Iv" id="DrV-HH-zW8"/>
<outlet property="delegate" destination="8yj-TG-7Iv" id="5Ta-JL-Sse"/>
</connections>
</tableView>
<toolbarItems/>
<navigationItem key="navigationItem" id="0rI-r6-PKi">
<barButtonItem key="rightBarButtonItem" style="done" systemItem="done" id="jGa-U1-8mj">
<connections>
<segue destination="eQQ-Mr-J7f" kind="unwind" identifier="commit" unwindAction="commitPersonEdition:" id="LQt-5H-hX8"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
<connections>
<outlet property="firstNameTableViewCell" destination="oKc-Vh-GAg" id="GgP-dg-jJI"/>
<outlet property="firstNameTextField" destination="eF9-yN-ByV" id="CwB-oL-I3U"/>
<outlet property="lastNameTableViewCell" destination="jUE-io-HLU" id="8SU-t1-EJR"/>
<outlet property="lastNameTextField" destination="D1U-mQ-lvp" id="4b9-am-ANQ"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="sm8-PY-oAW" userLabel="First Responder" sceneMemberID="firstResponder"/>
<exit id="eQQ-Mr-J7f" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="2843" y="377"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="n5c-pj-sKx">
<objects>
<navigationController id="oMH-Sb-bab" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="d5l-tl-lRt">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="8yj-TG-7Iv" kind="relationship" relationship="rootViewController" id="rAN-NO-1Mw"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="UxC-4D-edS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2023" y="377"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,14 @@
//
// GRDBDemoiOS7-Bridging-Header.h
// GRDBDemoiOS7
//
// Created by Gwendal Roué on 14/10/2015.
// Copyright © 2015 Gwendal Roué. All rights reserved.
//
#ifndef GRDBDemoiOS7_Bridging_Header_h
#define GRDBDemoiOS7_Bridging_Header_h
#import "sqlite3.h"
#endif /* GRDBDemoiOS7_Bridging_Header_h */
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1,38 @@
class Person : Record {
var id: Int64!
var firstName: String?
var lastName: String?
var fullName: String {
return [firstName, lastName].flatMap { $0 }.joinWithSeparator(" ")
}
init(firstName: String? = nil, lastName: String? = nil) {
self.firstName = firstName
self.lastName = lastName
super.init()
}
// MARK: - Record
override class func databaseTableName() -> String? {
return "persons"
}
override func updateFromRow(row: Row) {
if let dbv = row["id"] { id = dbv.value() }
if let dbv = row["firstName"] { firstName = dbv.value() }
if let dbv = row["lastName"] { lastName = dbv.value() }
super.updateFromRow(row) // Subclasses are required to call super.
}
override var storedDatabaseDictionary: [String: DatabaseValueConvertible?] {
return [
"id": id,
"firstName": firstName,
"lastName": lastName]
}
required init(row: Row) {
super.init(row: row)
}
}
@@ -0,0 +1,61 @@
import UIKit
class PersonEditionViewController: UITableViewController, UITextFieldDelegate {
@IBOutlet weak var firstNameTableViewCell: UITableViewCell!
@IBOutlet weak var firstNameTextField: UITextField!
@IBOutlet weak var lastNameTableViewCell: UITableViewCell!
@IBOutlet weak var lastNameTextField: UITextField!
// The edited person
var person: Person!
override func viewDidLoad() {
super.viewDidLoad()
// Initializes textFields with the person's names
firstNameTextField.text = person.firstName
lastNameTextField.text = person.lastName
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
// Auto focus firstName
firstNameTextField.becomeFirstResponder()
}
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
// Tapping a cell selects its text fields.
if indexPath == tableView.indexPathForCell(firstNameTableViewCell) {
firstNameTextField.becomeFirstResponder()
} else if indexPath == tableView.indexPathForCell(lastNameTableViewCell) {
lastNameTextField.becomeFirstResponder()
}
}
func textFieldShouldReturn(textField: UITextField) -> Bool {
// Tapping Return key focuses next text field.
if textField == firstNameTextField {
lastNameTextField.becomeFirstResponder()
} else {
textField.resignFirstResponder()
}
return false
}
func textFieldDidEndEditing(textField: UITextField) {
// Update person when text field ends editing.
if textField == firstNameTextField {
person.firstName = textField.text
} else if textField == lastNameTextField {
person.lastName = textField.text
}
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// About to cancel or commit: end editing.
// This dismisses the keyboard early, and apply pending changes through
// textFieldDidEndEditing(_).
view.endEditing(true)
}
}
@@ -0,0 +1,80 @@
import UIKit
class PersonsViewController: UITableViewController {
var persons = [Person]()
override func viewWillAppear(animated: Bool) {
// Reload persons, and the tableView
reloadPersons()
tableView.reloadData()
self.navigationItem.leftBarButtonItem = self.editButtonItem()
super.viewWillAppear(animated)
}
func reloadPersons() {
persons = dbQueue.inDatabase { db in
Person.fetchAll(db, "SELECT * FROM persons ORDER BY LOWER(firstName), LOWER(lastName)")
}
}
// MARK: - Segues
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "editNewPerson" {
let personEditionViewController = (segue.destinationViewController as! UINavigationController).topViewController as! PersonEditionViewController
personEditionViewController.person = Person()
}
}
// Unwind action: commit person edition
@IBAction func commitPersonEdition(segue: UIStoryboardSegue) {
let personEditionViewController = segue.sourceViewController as! PersonEditionViewController
let person = personEditionViewController.person
// Ignore person with no name
guard (person.firstName ?? "").characters.count > 0 || (person.lastName ?? "").characters.count > 0 else {
return
}
// Save person
try! dbQueue.inDatabase { db in
try person.save(db)
}
// Reload persons, and insert a cell.
reloadPersons()
let index = persons.indexOf { $0.id == person.id }!
tableView.insertRowsAtIndexPaths([NSIndexPath(forRow: index, inSection: 0)], withRowAnimation: .Automatic)
}
// MARK: - Table View
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return persons.count
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
let person = persons[indexPath.row]
cell.textLabel!.text = person.fullName
return cell
}
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
// Delete the person
let person = persons[indexPath.row]
try! dbQueue.inTransaction { db in
try person.delete(db)
return .Commit
}
persons.removeAtIndex(indexPath.row)
tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Automatic)
}
}
+18
View File
@@ -0,0 +1,18 @@
GRDBDemoiOS7
============
This application runs an application that displays an editable list of persons and targets iOS7.
To integrate GRDB in your iOS7 application:
1. Drag all Swift files contained in the [GRDB folder](../../../GRDB) in your project.
2. In the **Build Phase** tab of your target, add `libsqlite3.tbd` in the **Link Binary With Libraries** section.
3. [Add a Bridging header to your project](https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) in which you add:
```objc
#import "sqlite3.h"
```
4. Run
+3
View File
@@ -13,4 +13,7 @@
<FileRef
location = "group:DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj">
</FileRef>
<FileRef
location = "group:DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj">
</FileRef>
</Workspace>
+2 -1
View File
@@ -80,7 +80,7 @@ Installation
### iOS7
To use GRDB.swift in a project targetting iOS7, you must include the source files directly in your project.
You can use GRDB.swift in a project targetting iOS7. See [GRDBDemoiOS7](DemoApps/GRDBDemoiOS) for more information.
### CocoaPods
@@ -149,6 +149,7 @@ To fiddle with the library, open the `GRDB.xcworkspace` workspace: it contains a
**Sample Code**
- [GRDBDemoiOS](DemoApps/GRDBDemoiOS): A sample iOS application.
- [GRDBDemoiOS7](DemoApps/GRDBDemoiOS): A sample iOS7 application.
SQLite API