diff --git a/CHANGELOG.md b/CHANGELOG.md index 82199f01f..707c89b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Release Notes **Fixed** - Fix a crash that would sometimes happen when a FetchedRecordsController's callbacks avoid retain cycles by capturing unowned references. -- Robust handling of numeric overflows. Fixes [#68](https://github.com/groue/GRDB.swift/issues/68). +- Improved handling of numeric overflows. Fixes [#68](https://github.com/groue/GRDB.swift/issues/68). **New** @@ -14,6 +14,10 @@ Release Notes - With a custom SQLite build, transaction observers can observe individual column values in the rows modified by a transaction. Merged [#63](https://github.com/groue/GRDB.swift/pull/63) by [@swiftlyfalling](https://github.com/swiftlyfalling). - FetchedRecordsController can now fetch other values alongside the fetched records. This grants you the ability to fetch values that are consistent with the notified changes. +**Breaking Changes** + +- iOS7 is no longer supported. + ## 0.70.1 diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj/project.pbxproj b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj/project.pbxproj deleted file mode 100644 index 788336347..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj/project.pbxproj +++ /dev/null @@ -1,590 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 560A37E01C91391800949E71 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B31C91391800949E71 /* Configuration.swift */; }; - 560A37E11C91391800949E71 /* Database.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B41C91391800949E71 /* Database.swift */; }; - 560A37E21C91391800949E71 /* DatabaseError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B51C91391800949E71 /* DatabaseError.swift */; }; - 560A37E31C91391800949E71 /* DatabasePool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B61C91391800949E71 /* DatabasePool.swift */; }; - 560A37E41C91391800949E71 /* DatabaseQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B71C91391800949E71 /* DatabaseQueue.swift */; }; - 560A37E51C91391800949E71 /* DatabaseSchemaCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B81C91391800949E71 /* DatabaseSchemaCache.swift */; }; - 560A37E61C91391800949E71 /* DatabaseValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37B91C91391800949E71 /* DatabaseValue.swift */; }; - 560A37E71C91391800949E71 /* DatabaseValueConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37BA1C91391800949E71 /* DatabaseValueConvertible.swift */; }; - 560A37E81C91391800949E71 /* Row.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37BB1C91391800949E71 /* Row.swift */; }; - 560A37E91C91391800949E71 /* SerializedDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37BC1C91391800949E71 /* SerializedDatabase.swift */; }; - 560A37EA1C91391800949E71 /* Statement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37BD1C91391800949E71 /* Statement.swift */; }; - 560A37EB1C91391800949E71 /* StatementColumnConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37BE1C91391800949E71 /* StatementColumnConvertible.swift */; }; - 560A37EC1C91391800949E71 /* CGFloat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C11C91391800949E71 /* CGFloat.swift */; }; - 560A37ED1C91391800949E71 /* DatabaseCoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C31C91391800949E71 /* DatabaseCoder.swift */; }; - 560A37EE1C91391800949E71 /* DatabaseDateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C41C91391800949E71 /* DatabaseDateComponents.swift */; }; - 560A37EF1C91391800949E71 /* DatabaseValue+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C51C91391800949E71 /* DatabaseValue+Foundation.swift */; }; - 560A37F01C91391800949E71 /* NSData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C61C91391800949E71 /* NSData.swift */; }; - 560A37F11C91391800949E71 /* NSDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C71C91391800949E71 /* NSDate.swift */; }; - 560A37F21C91391800949E71 /* NSNull.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C81C91391800949E71 /* NSNull.swift */; }; - 560A37F31C91391800949E71 /* NSNumber.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37C91C91391800949E71 /* NSNumber.swift */; }; - 560A37F41C91391800949E71 /* NSString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37CA1C91391800949E71 /* NSString.swift */; }; - 560A37F51C91391800949E71 /* NSURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37CB1C91391800949E71 /* NSURL.swift */; }; - 560A37F61C91391800949E71 /* Row+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37CC1C91391800949E71 /* Row+Foundation.swift */; }; - 560A37F71C91391800949E71 /* StatementArguments+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37CD1C91391800949E71 /* StatementArguments+Foundation.swift */; }; - 560A37F81C91391800949E71 /* RawRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37CF1C91391800949E71 /* RawRepresentable.swift */; }; - 560A37F91C91391800949E71 /* StandardLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D01C91391800949E71 /* StandardLibrary.swift */; }; - 560A37FA1C91391800949E71 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D11C91391800949E71 /* Utils.swift */; }; - 560A37FB1C91391800949E71 /* FetchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D31C91391800949E71 /* FetchRequest.swift */; }; - 560A37FC1C91391800949E71 /* SQLCollation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D41C91391800949E71 /* SQLCollation.swift */; }; - 560A37FD1C91391800949E71 /* SQLFunction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D51C91391800949E71 /* SQLFunction.swift */; }; - 560A37FE1C91391800949E71 /* SQLOperator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D61C91391800949E71 /* SQLOperator.swift */; }; - 560A37FF1C91391800949E71 /* SQLSelectQuery.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D71C91391800949E71 /* SQLSelectQuery.swift */; }; - 560A38001C91391800949E71 /* DatabaseMigrator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37D91C91391800949E71 /* DatabaseMigrator.swift */; }; - 560A38011C91391800949E71 /* Migration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37DA1C91391800949E71 /* Migration.swift */; }; - 560A38021C91391800949E71 /* Persistable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37DC1C91391800949E71 /* Persistable.swift */; }; - 560A38031C91391800949E71 /* Record.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37DD1C91391800949E71 /* Record.swift */; }; - 560A38041C91391800949E71 /* RowConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37DE1C91391800949E71 /* RowConvertible.swift */; }; - 560A38051C91391800949E71 /* TableMapping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560A37DF1C91391800949E71 /* TableMapping.swift */; }; - 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 */; }; - 562FF9EC1BCE903D00759400 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 562FF9EB1BCE903D00759400 /* libsqlite3.tbd */; }; - 562FF9EF1BCE912C00759400 /* PersonEditionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9EE1BCE912C00759400 /* PersonEditionViewController.swift */; }; - 562FF9F21BCE914E00759400 /* Person.swift in Sources */ = {isa = PBXBuildFile; fileRef = 562FF9F11BCE914E00759400 /* Person.swift */; }; - 563363C81C942CAE000BE133 /* DatabaseReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 563363C71C942CAE000BE133 /* DatabaseReader.swift */; }; - 563363CA1C942CB4000BE133 /* DatabaseWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 563363C91C942CB4000BE133 /* DatabaseWriter.swift */; }; - 563363F01C95A41B000BE133 /* DatabaseStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 563363EF1C95A41B000BE133 /* DatabaseStore.swift */; }; - 566A20F31C58A4B300C5A218 /* AppDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 566A20F21C58A4B300C5A218 /* AppDatabase.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 560A37B31C91391800949E71 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; - 560A37B41C91391800949E71 /* Database.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Database.swift; sourceTree = ""; }; - 560A37B51C91391800949E71 /* DatabaseError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseError.swift; sourceTree = ""; }; - 560A37B61C91391800949E71 /* DatabasePool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabasePool.swift; sourceTree = ""; }; - 560A37B71C91391800949E71 /* DatabaseQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseQueue.swift; sourceTree = ""; }; - 560A37B81C91391800949E71 /* DatabaseSchemaCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseSchemaCache.swift; sourceTree = ""; }; - 560A37B91C91391800949E71 /* DatabaseValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseValue.swift; sourceTree = ""; }; - 560A37BA1C91391800949E71 /* DatabaseValueConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseValueConvertible.swift; sourceTree = ""; }; - 560A37BB1C91391800949E71 /* Row.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Row.swift; sourceTree = ""; }; - 560A37BC1C91391800949E71 /* SerializedDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SerializedDatabase.swift; sourceTree = ""; }; - 560A37BD1C91391800949E71 /* Statement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Statement.swift; sourceTree = ""; }; - 560A37BE1C91391800949E71 /* StatementColumnConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatementColumnConvertible.swift; sourceTree = ""; }; - 560A37C11C91391800949E71 /* CGFloat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloat.swift; sourceTree = ""; }; - 560A37C31C91391800949E71 /* DatabaseCoder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseCoder.swift; sourceTree = ""; }; - 560A37C41C91391800949E71 /* DatabaseDateComponents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseDateComponents.swift; sourceTree = ""; }; - 560A37C51C91391800949E71 /* DatabaseValue+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DatabaseValue+Foundation.swift"; sourceTree = ""; }; - 560A37C61C91391800949E71 /* NSData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSData.swift; sourceTree = ""; }; - 560A37C71C91391800949E71 /* NSDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSDate.swift; sourceTree = ""; }; - 560A37C81C91391800949E71 /* NSNull.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSNull.swift; sourceTree = ""; }; - 560A37C91C91391800949E71 /* NSNumber.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSNumber.swift; sourceTree = ""; }; - 560A37CA1C91391800949E71 /* NSString.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSString.swift; sourceTree = ""; }; - 560A37CB1C91391800949E71 /* NSURL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSURL.swift; sourceTree = ""; }; - 560A37CC1C91391800949E71 /* Row+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Row+Foundation.swift"; sourceTree = ""; }; - 560A37CD1C91391800949E71 /* StatementArguments+Foundation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "StatementArguments+Foundation.swift"; sourceTree = ""; }; - 560A37CF1C91391800949E71 /* RawRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawRepresentable.swift; sourceTree = ""; }; - 560A37D01C91391800949E71 /* StandardLibrary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StandardLibrary.swift; sourceTree = ""; }; - 560A37D11C91391800949E71 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; - 560A37D31C91391800949E71 /* FetchRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchRequest.swift; sourceTree = ""; }; - 560A37D41C91391800949E71 /* SQLCollation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLCollation.swift; sourceTree = ""; }; - 560A37D51C91391800949E71 /* SQLFunction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLFunction.swift; sourceTree = ""; }; - 560A37D61C91391800949E71 /* SQLOperator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLOperator.swift; sourceTree = ""; }; - 560A37D71C91391800949E71 /* SQLSelectQuery.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLSelectQuery.swift; sourceTree = ""; }; - 560A37D91C91391800949E71 /* DatabaseMigrator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseMigrator.swift; sourceTree = ""; }; - 560A37DA1C91391800949E71 /* Migration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Migration.swift; sourceTree = ""; }; - 560A37DC1C91391800949E71 /* Persistable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Persistable.swift; sourceTree = ""; }; - 560A37DD1C91391800949E71 /* Record.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Record.swift; sourceTree = ""; }; - 560A37DE1C91391800949E71 /* RowConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowConvertible.swift; sourceTree = ""; }; - 560A37DF1C91391800949E71 /* TableMapping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableMapping.swift; sourceTree = ""; }; - 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 = ""; }; - 562FF9961BCE8FA400759400 /* PersonsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonsViewController.swift; sourceTree = ""; }; - 562FF9991BCE8FA400759400 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 562FF99B1BCE8FA400759400 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 562FF99E1BCE8FA400759400 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 562FF9A01BCE8FA400759400 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 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 = ""; }; - 562FF9F11BCE914E00759400 /* Person.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Person.swift; sourceTree = ""; }; - 562FF9F41BCE930C00759400 /* GRDBDemoiOS7-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GRDBDemoiOS7-Bridging-Header.h"; sourceTree = ""; }; - 563363C71C942CAE000BE133 /* DatabaseReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseReader.swift; sourceTree = ""; }; - 563363C91C942CB4000BE133 /* DatabaseWriter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseWriter.swift; sourceTree = ""; }; - 563363EF1C95A41B000BE133 /* DatabaseStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseStore.swift; sourceTree = ""; }; - 566A20F21C58A4B300C5A218 /* AppDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDatabase.swift; sourceTree = ""; }; -/* 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 */ - 560A37B21C91391800949E71 /* Core */ = { - isa = PBXGroup; - children = ( - 560A37B31C91391800949E71 /* Configuration.swift */, - 560A37B41C91391800949E71 /* Database.swift */, - 560A37B51C91391800949E71 /* DatabaseError.swift */, - 560A37B61C91391800949E71 /* DatabasePool.swift */, - 560A37B71C91391800949E71 /* DatabaseQueue.swift */, - 563363C71C942CAE000BE133 /* DatabaseReader.swift */, - 560A37B81C91391800949E71 /* DatabaseSchemaCache.swift */, - 563363EF1C95A41B000BE133 /* DatabaseStore.swift */, - 560A37B91C91391800949E71 /* DatabaseValue.swift */, - 560A37BA1C91391800949E71 /* DatabaseValueConvertible.swift */, - 563363C91C942CB4000BE133 /* DatabaseWriter.swift */, - 560A37BB1C91391800949E71 /* Row.swift */, - 560A37BC1C91391800949E71 /* SerializedDatabase.swift */, - 560A37BD1C91391800949E71 /* Statement.swift */, - 560A37BE1C91391800949E71 /* StatementColumnConvertible.swift */, - 560A37BF1C91391800949E71 /* Support */, - 560A37D11C91391800949E71 /* Utils.swift */, - ); - path = Core; - sourceTree = ""; - }; - 560A37BF1C91391800949E71 /* Support */ = { - isa = PBXGroup; - children = ( - 560A37C01C91391800949E71 /* CoreGraphics */, - 560A37C21C91391800949E71 /* Foundation */, - 560A37CE1C91391800949E71 /* StandardLibrary */, - ); - path = Support; - sourceTree = ""; - }; - 560A37C01C91391800949E71 /* CoreGraphics */ = { - isa = PBXGroup; - children = ( - 560A37C11C91391800949E71 /* CGFloat.swift */, - ); - path = CoreGraphics; - sourceTree = ""; - }; - 560A37C21C91391800949E71 /* Foundation */ = { - isa = PBXGroup; - children = ( - 560A37C31C91391800949E71 /* DatabaseCoder.swift */, - 560A37C41C91391800949E71 /* DatabaseDateComponents.swift */, - 560A37C51C91391800949E71 /* DatabaseValue+Foundation.swift */, - 560A37C61C91391800949E71 /* NSData.swift */, - 560A37C71C91391800949E71 /* NSDate.swift */, - 560A37C81C91391800949E71 /* NSNull.swift */, - 560A37C91C91391800949E71 /* NSNumber.swift */, - 560A37CA1C91391800949E71 /* NSString.swift */, - 560A37CB1C91391800949E71 /* NSURL.swift */, - 560A37CC1C91391800949E71 /* Row+Foundation.swift */, - 560A37CD1C91391800949E71 /* StatementArguments+Foundation.swift */, - ); - path = Foundation; - sourceTree = ""; - }; - 560A37CE1C91391800949E71 /* StandardLibrary */ = { - isa = PBXGroup; - children = ( - 560A37CF1C91391800949E71 /* RawRepresentable.swift */, - 560A37D01C91391800949E71 /* StandardLibrary.swift */, - ); - path = StandardLibrary; - sourceTree = ""; - }; - 560A37D21C91391800949E71 /* FetchRequest */ = { - isa = PBXGroup; - children = ( - 560A37D31C91391800949E71 /* FetchRequest.swift */, - 560A37D41C91391800949E71 /* SQLCollation.swift */, - 560A37D51C91391800949E71 /* SQLFunction.swift */, - 560A37D61C91391800949E71 /* SQLOperator.swift */, - 560A37D71C91391800949E71 /* SQLSelectQuery.swift */, - ); - path = FetchRequest; - sourceTree = ""; - }; - 560A37D81C91391800949E71 /* Migrations */ = { - isa = PBXGroup; - children = ( - 560A37D91C91391800949E71 /* DatabaseMigrator.swift */, - 560A37DA1C91391800949E71 /* Migration.swift */, - ); - path = Migrations; - sourceTree = ""; - }; - 560A37DB1C91391800949E71 /* Record */ = { - isa = PBXGroup; - children = ( - 560A37DC1C91391800949E71 /* Persistable.swift */, - 560A37DD1C91391800949E71 /* Record.swift */, - 560A37DE1C91391800949E71 /* RowConvertible.swift */, - 560A37DF1C91391800949E71 /* TableMapping.swift */, - ); - path = Record; - sourceTree = ""; - }; - 562FF9881BCE8FA400759400 = { - isa = PBXGroup; - children = ( - 562FF9931BCE8FA400759400 /* GRDBDemoiOS7 */, - 562FF9921BCE8FA400759400 /* Products */, - ); - sourceTree = ""; - }; - 562FF9921BCE8FA400759400 /* Products */ = { - isa = PBXGroup; - children = ( - 562FF9911BCE8FA400759400 /* GRDBDemoiOS7.app */, - ); - name = Products; - sourceTree = ""; - }; - 562FF9931BCE8FA400759400 /* GRDBDemoiOS7 */ = { - isa = PBXGroup; - children = ( - 562FF9941BCE8FA400759400 /* AppDelegate.swift */, - 566A20F21C58A4B300C5A218 /* AppDatabase.swift */, - 562FF9F01BCE913900759400 /* Controllers */, - 562FF9F31BCE915B00759400 /* Models */, - 562FF9A61BCE8FB000759400 /* Resources */, - 562FF9ED1BCE904D00759400 /* GRDB */, - 562FF9A71BCE8FB600759400 /* Supporting Files */, - ); - path = GRDBDemoiOS7; - sourceTree = ""; - }; - 562FF9A61BCE8FB000759400 /* Resources */ = { - isa = PBXGroup; - children = ( - 562FF9981BCE8FA400759400 /* Main.storyboard */, - 562FF99B1BCE8FA400759400 /* Assets.xcassets */, - 562FF99D1BCE8FA400759400 /* LaunchScreen.storyboard */, - ); - name = Resources; - sourceTree = ""; - }; - 562FF9A71BCE8FB600759400 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 562FF9A01BCE8FA400759400 /* Info.plist */, - 562FF9F41BCE930C00759400 /* GRDBDemoiOS7-Bridging-Header.h */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 562FF9ED1BCE904D00759400 /* GRDB */ = { - isa = PBXGroup; - children = ( - 562FF9EB1BCE903D00759400 /* libsqlite3.tbd */, - 566A20F41C58A54F00C5A218 /* GRDB */, - ); - name = GRDB; - sourceTree = ""; - }; - 562FF9F01BCE913900759400 /* Controllers */ = { - isa = PBXGroup; - children = ( - 562FF9EE1BCE912C00759400 /* PersonEditionViewController.swift */, - 562FF9961BCE8FA400759400 /* PersonsViewController.swift */, - ); - name = Controllers; - sourceTree = ""; - }; - 562FF9F31BCE915B00759400 /* Models */ = { - isa = PBXGroup; - children = ( - 562FF9F11BCE914E00759400 /* Person.swift */, - ); - name = Models; - sourceTree = ""; - }; - 566A20F41C58A54F00C5A218 /* GRDB */ = { - isa = PBXGroup; - children = ( - 560A37B21C91391800949E71 /* Core */, - 560A37D21C91391800949E71 /* FetchRequest */, - 560A37D81C91391800949E71 /* Migrations */, - 560A37DB1C91391800949E71 /* Record */, - ); - name = GRDB; - path = ../../../GRDB; - sourceTree = ""; - }; -/* 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 = ( - 560A37FB1C91391800949E71 /* FetchRequest.swift in Sources */, - 560A37EC1C91391800949E71 /* CGFloat.swift in Sources */, - 560A38011C91391800949E71 /* Migration.swift in Sources */, - 560A37EB1C91391800949E71 /* StatementColumnConvertible.swift in Sources */, - 560A37EF1C91391800949E71 /* DatabaseValue+Foundation.swift in Sources */, - 560A37E01C91391800949E71 /* Configuration.swift in Sources */, - 560A37E91C91391800949E71 /* SerializedDatabase.swift in Sources */, - 562FF9EF1BCE912C00759400 /* PersonEditionViewController.swift in Sources */, - 563363F01C95A41B000BE133 /* DatabaseStore.swift in Sources */, - 560A38051C91391800949E71 /* TableMapping.swift in Sources */, - 560A37E71C91391800949E71 /* DatabaseValueConvertible.swift in Sources */, - 560A37E31C91391800949E71 /* DatabasePool.swift in Sources */, - 562FF9971BCE8FA400759400 /* PersonsViewController.swift in Sources */, - 560A37E51C91391800949E71 /* DatabaseSchemaCache.swift in Sources */, - 560A37E41C91391800949E71 /* DatabaseQueue.swift in Sources */, - 560A37F11C91391800949E71 /* NSDate.swift in Sources */, - 562FF9F21BCE914E00759400 /* Person.swift in Sources */, - 560A37F01C91391800949E71 /* NSData.swift in Sources */, - 562FF9951BCE8FA400759400 /* AppDelegate.swift in Sources */, - 560A37FC1C91391800949E71 /* SQLCollation.swift in Sources */, - 560A37F71C91391800949E71 /* StatementArguments+Foundation.swift in Sources */, - 560A37EE1C91391800949E71 /* DatabaseDateComponents.swift in Sources */, - 560A37ED1C91391800949E71 /* DatabaseCoder.swift in Sources */, - 560A37E61C91391800949E71 /* DatabaseValue.swift in Sources */, - 560A37F31C91391800949E71 /* NSNumber.swift in Sources */, - 560A37FF1C91391800949E71 /* SQLSelectQuery.swift in Sources */, - 560A37F41C91391800949E71 /* NSString.swift in Sources */, - 560A37E21C91391800949E71 /* DatabaseError.swift in Sources */, - 560A38041C91391800949E71 /* RowConvertible.swift in Sources */, - 560A37F91C91391800949E71 /* StandardLibrary.swift in Sources */, - 563363CA1C942CB4000BE133 /* DatabaseWriter.swift in Sources */, - 560A37FA1C91391800949E71 /* Utils.swift in Sources */, - 560A37F61C91391800949E71 /* Row+Foundation.swift in Sources */, - 560A37FD1C91391800949E71 /* SQLFunction.swift in Sources */, - 560A37FE1C91391800949E71 /* SQLOperator.swift in Sources */, - 560A37F21C91391800949E71 /* NSNull.swift in Sources */, - 560A37E11C91391800949E71 /* Database.swift in Sources */, - 560A37E81C91391800949E71 /* Row.swift in Sources */, - 560A38021C91391800949E71 /* Persistable.swift in Sources */, - 560A37F51C91391800949E71 /* NSURL.swift in Sources */, - 560A37F81C91391800949E71 /* RawRepresentable.swift in Sources */, - 560A38001C91391800949E71 /* DatabaseMigrator.swift in Sources */, - 566A20F31C58A4B300C5A218 /* AppDatabase.swift in Sources */, - 560A37EA1C91391800949E71 /* Statement.swift in Sources */, - 560A38031C91391800949E71 /* Record.swift in Sources */, - 563363C81C942CAE000BE133 /* DatabaseReader.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 562FF9981BCE8FA400759400 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 562FF9991BCE8FA400759400 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 562FF99D1BCE8FA400759400 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 562FF99E1BCE8FA400759400 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* 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 */; -} diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 94d4a737b..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDatabase.swift b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDatabase.swift deleted file mode 100644 index 6b2d82832..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDatabase.swift +++ /dev/null @@ -1,64 +0,0 @@ -import Foundation - - -// The columns for the GRDB Query Interface -// -// See https://github.com/groue/GRDB.swift/#the-query-interface - -struct Col { - static let id = SQLColumn("id") - static let firstName = SQLColumn("firstName") - static let lastName = SQLColumn("lastName") -} - - -// The shared database queue, stored in a global. -// It is initialized in setupDatabase() - -var dbQueue: DatabaseQueue! - -func setupDatabase() { - - // Connect to the database - // - // See https://github.com/groue/GRDB.swift/#database-queues - - let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first! as NSString - let databasePath = documentsPath.stringByAppendingPathComponent("db.sqlite") - dbQueue = try! DatabaseQueue(path: databasePath) - - - // SQLite does not support Unicode: let's add a custom collation which will - // allow us to sort persons by name. - // - // See https://github.com/groue/GRDB.swift/#string-comparison - - let collation = DatabaseCollation("localized_case_insensitive") { (lhs, rhs) in - return (lhs as NSString).localizedCaseInsensitiveCompare(rhs) - } - - dbQueue.inDatabase { db in - db.addCollation(collation) - } - - - // Use DatabaseMigrator to setup the database - // - // See https://github.com/groue/GRDB.swift/#migrations - - var migrator = DatabaseMigrator() - migrator.registerMigration("createPersons") { db in - try db.execute( - "CREATE TABLE persons (" + - "id INTEGER PRIMARY KEY, " + - "firstName TEXT COLLATE localized_case_insensitive, " + - "lastName TEXT COLLATE localized_case_insensitive" + - ")") - } - migrator.registerMigration("addPersons") { db in - try Person(firstName: "Arthur", lastName: "Miller").insert(db) - try Person(firstName: "Barbra", lastName: "Streisand").insert(db) - try Person(firstName: "Cinderella").insert(db) - } - try! migrator.migrate(dbQueue) -} \ No newline at end of file diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDelegate.swift b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDelegate.swift deleted file mode 100644 index d5b26ac98..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - setupDatabase() - return true - } -} - diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Assets.xcassets/AppIcon.appiconset/Contents.json b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f74..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "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" - } -} \ No newline at end of file diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Base.lproj/LaunchScreen.storyboard b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e183..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Base.lproj/Main.storyboard b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Base.lproj/Main.storyboard deleted file mode 100644 index d1c6ca434..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Base.lproj/Main.storyboard +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/GRDBDemoiOS7-Bridging-Header.h b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/GRDBDemoiOS7-Bridging-Header.h deleted file mode 100644 index 167fbb6c4..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/GRDBDemoiOS7-Bridging-Header.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// 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 */ diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Info.plist b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Info.plist deleted file mode 100644 index 6905cc67b..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Person.swift b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Person.swift deleted file mode 100644 index b6e2ef5f0..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/Person.swift +++ /dev/null @@ -1,40 +0,0 @@ -class Person : Record { - var id: Int64! - var firstName: String? - var lastName: String? - var fullName: String { - return [firstName, lastName].flatMap { $0 }.filter { !$0.isEmpty }.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" - } - - required init(_ row: Row) { - id = row.value(named: "id") - firstName = row.value(named: "firstName") - lastName = row.value(named: "lastName") - super.init(row) - - } - - override var persistentDictionary: [String: DatabaseValueConvertible?] { - return [ - "id": id, - "firstName": firstName, - "lastName": lastName] - } - - override func didInsertWithRowID(rowID: Int64, forColumn column: String?) { - id = rowID - } -} diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonEditionViewController.swift b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonEditionViewController.swift deleted file mode 100644 index 2d45d20af..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonEditionViewController.swift +++ /dev/null @@ -1,61 +0,0 @@ -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) - } -} diff --git a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonsViewController.swift b/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonsViewController.swift deleted file mode 100644 index 4882240ed..000000000 --- a/DemoApps/GRDBDemoiOS7/GRDBDemoiOS7/PersonsViewController.swift +++ /dev/null @@ -1,85 +0,0 @@ -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.order(Col.firstName, Col.lastName).fetchAll(db) - } - } - - - // 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 - cell.selectionStyle = .None - 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) - } - - override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { - tableView.deselectRowAtIndexPath(indexPath, animated: true) - } - - -} - diff --git a/DemoApps/GRDBDemoiOS7/README.md b/DemoApps/GRDBDemoiOS7/README.md deleted file mode 100644 index cdd71112d..000000000 --- a/DemoApps/GRDBDemoiOS7/README.md +++ /dev/null @@ -1,18 +0,0 @@ -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 diff --git a/GRDB.xcworkspace/contents.xcworkspacedata b/GRDB.xcworkspace/contents.xcworkspacedata index a4181869b..f4af6ae62 100644 --- a/GRDB.xcworkspace/contents.xcworkspacedata +++ b/GRDB.xcworkspace/contents.xcworkspacedata @@ -32,7 +32,4 @@ - -