From a3de8281eff0bfd15e89c48b79230155e6b490ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 8 Sep 2016 09:13:23 +0200 Subject: [PATCH 01/13] Ooops add watchOS to the podspec --- GRDB.swift.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index f288855f9..a884987a8 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -10,6 +10,7 @@ Pod::Spec.new do |s| s.module_name = 'GRDB' s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.9' + s.watchos.deployment_target = '2.0' s.requires_arc = true s.module_map = 'Support/module.modulemap' s.framework = 'Foundation' From 5e75b1e7dc8a39eb9ccdd6798d6b24044d1dba78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 8 Sep 2016 13:04:01 +0200 Subject: [PATCH 02/13] v0.80.1 --- CHANGELOG.md | 7 +++++++ GRDB.swift.podspec | 2 +- README.md | 18 +++++++++--------- Support/Info.plist | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee7c22bb9..fc25ca72f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ Release Notes ============= +## 0.80.1 + +**Fixed** + +- WatchOS framework is now available through CocoaPods. + + ## 0.80.0 Released September 7, 2016 diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index a884987a8..cc50f4a60 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GRDB.swift' - s.version = '0.80.0' + s.version = '0.80.1' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A Swift application toolkit for SQLite databases.' s.homepage = 'https://github.com/groue/GRDB.swift' diff --git a/README.md b/README.md index e73c72bea..5f06e59af 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.2-orange.svg?style=fla ### A Swift application toolkit for SQLite databases. -**Latest release**: September 7, 2016 • version 0.80.0 • [CHANGELOG](CHANGELOG.md) +**Latest release**: September 8, 2016 • version 0.80.1 • [CHANGELOG](CHANGELOG.md) **Requirements**: iOS 8.0+ / OSX 10.9+ • Xcode 7.3+ • Swift 2.2 (see the [Swift3](https://github.com/groue/GRDB.swift/tree/Swift3) branch for Swift 3). @@ -163,7 +163,7 @@ Documentation **Reference** -- [GRDB Reference](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/index.html) (on cocoadocs.org) +- [GRDB Reference](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/index.html) (on cocoadocs.org) **Getting Started** @@ -335,7 +335,7 @@ let dbQueue = try DatabaseQueue( configuration: config) ``` -See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Structs/Configuration.html) for more details. +See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/Configuration.html) for more details. ## Database Pools @@ -415,7 +415,7 @@ let dbPool = try DatabasePool( configuration: config) ``` -See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Structs/Configuration.html) for more details. +See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/Configuration.html) for more details. Database pools are more memory-hungry than database queues. See [Memory Management](#memory-management) for more information. @@ -1514,10 +1514,10 @@ for person in Person.fetch(db, sql, adapter: adapter) { For more information about row adapters, see the documentation of: -- [RowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Protocols/RowAdapter.html): the protocol that lets you define your custom row adapters -- [ColumnMapping](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Structs/ColumnMapping.html): a row adapter that renames row columns -- [SuffixRowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Structs/SuffixRowAdapter.html): a row adapter that hides the first columns of a row -- [ScopeAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Structs/ScopeAdapter.html): the row adapter that groups several adapters together to define scopes +- [RowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Protocols/RowAdapter.html): the protocol that lets you define your custom row adapters +- [ColumnMapping](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/ColumnMapping.html): a row adapter that renames row columns +- [SuffixRowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/SuffixRowAdapter.html): a row adapter that hides the first columns of a row +- [ScopeAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/ScopeAdapter.html): the row adapter that groups several adapters together to define scopes ## Raw SQLite Pointers @@ -3733,7 +3733,7 @@ let count2 = dbQueue.inDatabase { db in SQLite concurrency is a wiiide topic. -First have a detailed look at the full API of [DatabaseQueue](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Classes/DatabaseQueue.html) and [DatabasePool](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Classes/DatabasePool.html). Both adopt the [DatabaseReader](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Protocols/DatabaseReader.html) and [DatabaseWriter](http://cocoadocs.org/docsets/GRDB.swift/0.80.0/Protocols/DatabaseWriter.html) protocols, so that you can write code that targets both classes. +First have a detailed look at the full API of [DatabaseQueue](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Classes/DatabaseQueue.html) and [DatabasePool](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Classes/DatabasePool.html). Both adopt the [DatabaseReader](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Protocols/DatabaseReader.html) and [DatabaseWriter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Protocols/DatabaseWriter.html) protocols, so that you can write code that targets both classes. If the built-in queues and pools do not fit your needs, or if you can not guarantee that a single queue or pool is accessing your database file, you may have a look at: diff --git a/Support/Info.plist b/Support/Info.plist index 456e4f527..8f4355c43 100644 --- a/Support/Info.plist +++ b/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.80.0 + 0.80.1 CFBundleSignature ???? CFBundleVersion From 3438addf6c54c327a99ae196057190e66dda2f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 08:44:03 +0200 Subject: [PATCH 03/13] Swift 2.3 (addresses #110, #112) --- .../GRDBDemoiOS.xcodeproj/project.pbxproj | 67 +++++++++++++++++-- GRDB.xcodeproj/project.pbxproj | 47 ++++++++++--- .../xcschemes/GRDBCipherOSX.xcscheme | 2 +- .../xcschemes/GRDBCipheriOS.xcscheme | 2 +- .../xcshareddata/xcschemes/GRDBOSX.xcscheme | 2 +- .../xcschemes/GRDBWatchOS.xcscheme | 2 +- .../xcshareddata/xcschemes/GRDBiOS.xcscheme | 2 +- GRDB/Core/Support/Foundation/NSURL.swift | 3 + Support/module.modulemap | 2 +- 9 files changed, 109 insertions(+), 20 deletions(-) diff --git a/DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj/project.pbxproj b/DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj/project.pbxproj index fab27082d..3ff299802 100644 --- a/DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj/project.pbxproj +++ b/DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj/project.pbxproj @@ -28,6 +28,8 @@ 568C7AE41CA6CEBE00796484 /* PersonEditionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568C7AE31CA6CEBE00796484 /* PersonEditionViewController.swift */; }; 568C7AE61CA6F95300796484 /* DemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568C7AE51CA6F95300796484 /* DemoViewController.swift */; }; 568C7AE81CA6FB6600796484 /* SimplePersonsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 568C7AE71CA6FB6600796484 /* SimplePersonsViewController.swift */; }; + 56BB80191D828F8300B719CF /* GRDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5624A6EB1D80B13400AD3DCE /* GRDB.framework */; }; + 56BB801A1D828F8300B719CF /* GRDB.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5624A6EB1D80B13400AD3DCE /* GRDB.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -171,6 +173,20 @@ remoteGlobalIDString = 56E5D7C91B4D3FED00430942; remoteInfo = GRDBiOS; }; + 56BB80071D828F6A00B719CF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 568C7AC51CA6C6BF00796484 /* GRDB.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 5654909F1D5A4798005622CB; + remoteInfo = GRDBWatchOS; + }; + 56BB801B1D828F8300B719CF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 568C7AC51CA6C6BF00796484 /* GRDB.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 5654909F1D5A4798005622CB; + remoteInfo = GRDBWatchOS; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -207,6 +223,17 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 56BB801D1D828F8300B719CF /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 56BB801A1D828F8300B719CF /* GRDB.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -241,6 +268,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 56BB80191D828F8300B719CF /* GRDB.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -376,10 +404,13 @@ 5624A6AE1D80B13300AD3DCE /* Sources */, 5624A6AF1D80B13300AD3DCE /* Frameworks */, 5624A6B01D80B13300AD3DCE /* Resources */, + 56BB801D1D828F8300B719CF /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( + 56BB80081D828F6A00B719CF /* PBXTargetDependency */, + 56BB801C1D828F8300B719CF /* PBXTargetDependency */, ); name = "GRDBDemoWatchOS Extension"; productName = "GRDBDemoWatchOS Extension"; @@ -414,19 +445,22 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = Pierlis; TargetAttributes = { 5624A6A51D80B13300AD3DCE = { CreatedOnToolsVersion = 7.3.1; DevelopmentTeam = AMD8W895CT; + LastSwiftMigration = 0800; }; 5624A6B11D80B13300AD3DCE = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; 568C7A951CA6C63100796484 = { CreatedOnToolsVersion = 7.3; DevelopmentTeam = AMD8W895CT; + LastSwiftMigration = 0800; }; }; }; @@ -652,6 +686,16 @@ name = GRDBiOS; targetProxy = 568C7ADC1CA6C6D100796484 /* PBXContainerItemProxy */; }; + 56BB80081D828F6A00B719CF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GRDBWatchOS; + targetProxy = 56BB80071D828F6A00B719CF /* PBXContainerItemProxy */; + }; + 56BB801C1D828F8300B719CF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GRDBWatchOS; + targetProxy = 56BB801B1D828F8300B719CF /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -685,16 +729,17 @@ 5624A6C21D80B13400AD3DCE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; IBSC_MODULE = GRDBDemoWatchOS_Extension; INFOPLIST_FILE = GRDBDemoWatchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = GRDB.GRDBDemoiOS.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -703,16 +748,17 @@ 5624A6C31D80B13400AD3DCE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; IBSC_MODULE = GRDBDemoWatchOS_Extension; INFOPLIST_FILE = GRDBDemoWatchOS/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = GRDB.GRDBDemoiOS.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -727,6 +773,7 @@ PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -741,6 +788,7 @@ PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.2; }; @@ -760,8 +808,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -805,8 +855,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -825,6 +877,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -832,32 +885,34 @@ 568C7AA91CA6C63100796484 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; INFOPLIST_FILE = GRDBDemoiOS/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = GRDB.GRDBDemoiOS; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; + SWIFT_VERSION = 2.3; }; name = Debug; }; 568C7AAA1CA6C63100796484 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; INFOPLIST_FILE = GRDBDemoiOS/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = GRDB.GRDBDemoiOS; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; + SWIFT_VERSION = 2.3; }; name = Release; }; @@ -871,6 +926,7 @@ 5624A6C51D80B13400AD3DCE /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 5624A6EE1D80B13400AD3DCE /* Build configuration list for PBXNativeTarget "GRDBDemoWatchOS" */ = { isa = XCConfigurationList; @@ -879,6 +935,7 @@ 5624A6C31D80B13400AD3DCE /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 568C7A911CA6C63100796484 /* Build configuration list for PBXProject "GRDBDemoiOS" */ = { isa = XCConfigurationList; diff --git a/GRDB.xcodeproj/project.pbxproj b/GRDB.xcodeproj/project.pbxproj index 2e62adbfe..3b0db65f7 100755 --- a/GRDB.xcodeproj/project.pbxproj +++ b/GRDB.xcodeproj/project.pbxproj @@ -1835,6 +1835,14 @@ path = Function; sourceTree = ""; }; + 560DBC2E1D82862B00601B07 /* GRDBwatchOS */ = { + isa = PBXGroup; + children = ( + 565490E51D5AE282005622CB /* libsqlite3.tbd */, + ); + name = GRDBwatchOS; + sourceTree = ""; + }; 560FC54F1CB0047D0014AA8E /* GRDBCipher */ = { isa = PBXGroup; children = ( @@ -2320,7 +2328,6 @@ DC3773E919C8CBB3004FCF85 = { isa = PBXGroup; children = ( - 565490E51D5AE282005622CB /* libsqlite3.tbd */, 56DBEC341C19A0020093A2EE /* CHANGELOG.md */, DC37744719C8F50B004FCF85 /* README.md */, 56E1524B1B43FD5B00EE27AA /* TODO.md */, @@ -2384,9 +2391,10 @@ isa = PBXGroup; children = ( 56B8F49A1B4E2F3600C24296 /* GRDB.xcconfig */, - 56C48E731C9A9923005DF1D9 /* module.modulemap */, 567D10621C9A911C00ACC500 /* GRDBiOS */, 567D10641C9A911C00ACC500 /* GRDBOSX */, + 560DBC2E1D82862B00601B07 /* GRDBwatchOS */, + 56C48E731C9A9923005DF1D9 /* module.modulemap */, DC3773F819C8CBB3004FCF85 /* GRDB.h */, DC2393C61ABE35F8003FF113 /* GRDB-Bridging.h */, DC3773F719C8CBB3004FCF85 /* Info.plist */, @@ -2823,35 +2831,44 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0710; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Gwendal Roué"; TargetAttributes = { 5654909F1D5A4798005622CB = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; 56E5D7C91B4D3FED00430942 = { CreatedOnToolsVersion = 7.0; + LastSwiftMigration = 0800; }; 56E5D7D21B4D3FEE00430942 = { CreatedOnToolsVersion = 7.0; + LastSwiftMigration = 0800; }; 56E5D7F81B4D422D00430942 = { CreatedOnToolsVersion = 7.0; + LastSwiftMigration = 0800; }; DC3773F219C8CBB3004FCF85 = { CreatedOnToolsVersion = 6.1; + LastSwiftMigration = 0800; }; F3BA7FFD1CFB25E4003DC1BA = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; F3BA80401CFB2AD7003DC1BA = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; F3BA80591CFB2BB2003DC1BA = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; F3BA809A1CFB2F6F003DC1BA = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 0800; }; }; }; @@ -4576,6 +4593,7 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -4597,6 +4615,7 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -4678,7 +4697,7 @@ baseConfigurationReference = 568BE51F1CB0360500270F93 /* GRDB.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -4699,7 +4718,7 @@ baseConfigurationReference = 568BE51F1CB0360500270F93 /* GRDB.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -4784,7 +4803,7 @@ baseConfigurationReference = 56B8F49A1B4E2F3600C24296 /* GRDB.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -4805,7 +4824,7 @@ baseConfigurationReference = 56B8F49A1B4E2F3600C24296 /* GRDB.xcconfig */; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -4898,8 +4917,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -4908,6 +4929,7 @@ 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", @@ -4923,6 +4945,7 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 2.3; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -4941,8 +4964,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; @@ -4950,6 +4975,7 @@ 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; @@ -4957,6 +4983,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MTL_ENABLE_DEBUG_INFO = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 2.3; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -5008,7 +5036,7 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -5030,7 +5058,7 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -5198,6 +5226,7 @@ 565490A61D5A4798005622CB /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 56553C151C3E906C00522B5C /* Build configuration list for PBXNativeTarget "GRDBOSXCrashTests" */ = { isa = XCConfigurationList; diff --git a/GRDB.xcodeproj/xcshareddata/xcschemes/GRDBCipherOSX.xcscheme b/GRDB.xcodeproj/xcshareddata/xcschemes/GRDBCipherOSX.xcscheme index 1517e737e..7b68b015f 100644 --- a/GRDB.xcodeproj/xcshareddata/xcschemes/GRDBCipherOSX.xcscheme +++ b/GRDB.xcodeproj/xcshareddata/xcschemes/GRDBCipherOSX.xcscheme @@ -1,6 +1,6 @@ Date: Fri, 9 Sep 2016 08:48:10 +0200 Subject: [PATCH 04/13] Apply https://github.com/groue/GRDB.swift/issues/101#issuecomment-240568714 --- TODO.md | 1 - .../SQLTableBuilderTests.swift | 152 +++++++++++------- 2 files changed, 94 insertions(+), 59 deletions(-) diff --git a/TODO.md b/TODO.md index 0a6041314..7935b4b38 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,3 @@ -- [ ] Fix slow compilation time of SQLTableBuilderTests.swift - [ ] @hdlj: Extensibility of the Query Interface - [ ] @hdlj: FetchedRecordsController throttling - [ ] @hdlj: Check RAM pressure diff --git a/Tests/Public/SQLTableBuilder/SQLTableBuilderTests.swift b/Tests/Public/SQLTableBuilder/SQLTableBuilderTests.swift index 23217e423..f686a925d 100644 --- a/Tests/Public/SQLTableBuilder/SQLTableBuilderTests.swift +++ b/Tests/Public/SQLTableBuilder/SQLTableBuilderTests.swift @@ -8,7 +8,7 @@ import XCTest #endif class SQLTableBuilderTests: GRDBTestCase { - + func testCreateTable() { assertNoError { let dbQueue = try makeDatabaseQueue() @@ -18,26 +18,45 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("id", .Integer).primaryKey() t.column("name", .Text) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"id\" INTEGER PRIMARY KEY, " + "\"name\" TEXT" + - ")") + ")") as String) } } } func testTableCreationOptions() { + assertNoError { + let dbQueue = try makeDatabaseQueue() + try dbQueue.inDatabase { db in + try db.create(table: "test", temporary: true, ifNotExists: true) { t in + t.column("id", .Integer).primaryKey() + } + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TEMPORARY TABLE IF NOT EXISTS \"test\" (" + + "\"id\" INTEGER PRIMARY KEY" + + ")") as String) + } + } + } + + @available(iOS 8.2, OSX 10.10, *) + func testTableWithoutRowID() { assertNoError { let dbQueue = try makeDatabaseQueue() try dbQueue.inDatabase { db in try db.create(table: "test", temporary: true, ifNotExists: true, withoutRowID: true) { t in t.column("id", .Integer).primaryKey() } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TEMPORARY TABLE IF NOT EXISTS \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TEMPORARY TABLE IF NOT EXISTS \"test\" (" + "\"id\" INTEGER PRIMARY KEY" + - ") WITHOUT ROWID") + ") WITHOUT ROWID") as String) } } } @@ -49,20 +68,22 @@ class SQLTableBuilderTests: GRDBTestCase { try db.create(table: "test") { t in t.column("id", .Integer).primaryKey(onConflict: .Fail) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"id\" INTEGER PRIMARY KEY ON CONFLICT FAIL" + - ")") + ")") as String) return .Rollback } try dbQueue.inTransaction { db in try db.create(table: "test") { t in t.column("id", .Integer).primaryKey(autoincrement: true) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"id\" INTEGER PRIMARY KEY AUTOINCREMENT" + - ")") + ")") as String) return .Rollback } } @@ -80,15 +101,16 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("e", .Integer).notNull(onConflict: .Ignore) t.column("f", .Integer).notNull(onConflict: .Replace) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" INTEGER NOT NULL, " + "\"b\" INTEGER NOT NULL, " + "\"c\" INTEGER NOT NULL ON CONFLICT ROLLBACK, " + "\"d\" INTEGER NOT NULL ON CONFLICT FAIL, " + "\"e\" INTEGER NOT NULL ON CONFLICT IGNORE, " + "\"f\" INTEGER NOT NULL ON CONFLICT REPLACE" + - ")") + ")") as String) } } } @@ -105,15 +127,16 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("e", .Integer).unique(onConflict: .Ignore) t.column("f", .Integer).unique(onConflict: .Replace) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" INTEGER UNIQUE, " + "\"b\" INTEGER UNIQUE, " + "\"c\" INTEGER UNIQUE ON CONFLICT ROLLBACK, " + "\"d\" INTEGER UNIQUE ON CONFLICT FAIL, " + "\"e\" INTEGER UNIQUE ON CONFLICT IGNORE, " + "\"f\" INTEGER UNIQUE ON CONFLICT REPLACE" + - ")") + ")") as String) } } } @@ -127,12 +150,13 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("b", .Integer).check(sql: "b <> 2") t.column("c", .Integer).check { $0 > 0 }.check { $0 < 10 } } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" INTEGER CHECK ((\"a\" > 0)), " + "\"b\" INTEGER CHECK (b <> 2), " + "\"c\" INTEGER CHECK ((\"c\" > 0)) CHECK ((\"c\" < 10))" + - ")") + ")") as String) // Sanity check try db.execute("INSERT INTO test (a, b, c) VALUES (1, 0, 1)") @@ -156,14 +180,15 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("d", .Integer).defaults(to: "foo".dataUsingEncoding(NSUTF8StringEncoding)!) t.column("e", .Integer).defaults(sql: "NULL") } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" INTEGER DEFAULT 1, " + "\"b\" INTEGER DEFAULT 1.0, " + "\"c\" INTEGER DEFAULT '''fooéı👨👨🏿🇫🇷🇨🇮''', " + "\"d\" INTEGER DEFAULT x'666f6f', " + "\"e\" INTEGER DEFAULT NULL" + - ")") + ")") as String) // Sanity check try db.execute("INSERT INTO test DEFAULT VALUES") @@ -180,10 +205,11 @@ class SQLTableBuilderTests: GRDBTestCase { try db.create(table: "test") { t in t.column("name", .Text).collate(.Nocase) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"name\" TEXT COLLATE NOCASE" + - ")") + ")") as String) return .Rollback } @@ -193,10 +219,11 @@ class SQLTableBuilderTests: GRDBTestCase { try db.create(table: "test") { t in t.column("name", .Text).collate(collation) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"name\" TEXT COLLATE foo" + - ")") + ")") as String) return .Rollback } } @@ -215,12 +242,13 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("parentEmail", .Text).references("parent", column: "email", onDelete: .Restrict, deferred: true) t.column("weird", .Text).references("parent", column: "name").references("parent", column: "email") } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"child\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"child\" (" + "\"parentName\" TEXT REFERENCES \"parent\"(\"name\") ON DELETE CASCADE ON UPDATE CASCADE, " + "\"parentEmail\" TEXT REFERENCES \"parent\"(\"email\") ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED, " + "\"weird\" TEXT REFERENCES \"parent\"(\"name\") REFERENCES \"parent\"(\"email\")" + - ")") + ")") as String) } } } @@ -234,12 +262,13 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("a", .Text) t.column("b", .Text) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" TEXT, " + "\"b\" TEXT, " + "PRIMARY KEY (\"a\", \"b\")" + - ")") + ")") as String) return .Rollback } try dbQueue.inTransaction { db in @@ -248,12 +277,13 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("a", .Text) t.column("b", .Text) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" TEXT, " + "\"b\" TEXT, " + "PRIMARY KEY (\"a\", \"b\") ON CONFLICT FAIL" + - ")") + ")") as String) return .Rollback } } @@ -270,14 +300,15 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("b", .Text) t.column("c", .Text) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" TEXT, " + "\"b\" TEXT, " + "\"c\" TEXT, " + "UNIQUE (\"a\"), " + "UNIQUE (\"b\", \"c\") ON CONFLICT FAIL" + - ")") + ")") as String) } } } @@ -298,14 +329,15 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("d", .Text) t.column("e", .Text) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"child\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"child\" (" + "\"c\" TEXT, " + "\"d\" TEXT, " + "\"e\" TEXT, " + "FOREIGN KEY (\"c\", \"d\") REFERENCES \"parent\"(\"a\", \"b\") ON DELETE CASCADE ON UPDATE CASCADE, " + "FOREIGN KEY (\"d\", \"e\") REFERENCES \"parent\"(\"b\", \"a\") ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED" + - ")") + ")") as String) } } } @@ -320,13 +352,14 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("a", .Integer) t.column("b", .Integer) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test\" (" + "\"a\" INTEGER, " + "\"b\" INTEGER, " + "CHECK (((\"a\" + \"b\") < 10)), " + "CHECK (a + b < 10)" + - ")") + ")") as String) // Sanity check try db.execute("INSERT INTO test (a, b) VALUES (1, 0)") @@ -347,23 +380,25 @@ class SQLTableBuilderTests: GRDBTestCase { t.column("id", .Integer).primaryKey() t.column("id2", .Integer).references("test1") } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test1\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test1\" (" + "\"id\" INTEGER PRIMARY KEY, " + "\"id2\" INTEGER REFERENCES \"test1\"(\"id\")" + - ")") + ")") as String) try db.create(table: "test2") { t in t.column("id", .Integer) t.column("id2", .Integer).references("test2") t.primaryKey(["id"]) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test2\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test2\" (" + "\"id\" INTEGER, " + "\"id2\" INTEGER REFERENCES \"test2\"(\"id\"), " + "PRIMARY KEY (\"id\")" + - ")") + ")") as String) try db.create(table: "test3") { t in t.column("a", .Integer) @@ -373,15 +408,16 @@ class SQLTableBuilderTests: GRDBTestCase { t.foreignKey(["c", "d"], references: "test3") t.primaryKey(["a", "b"]) } - XCTAssertEqual(self.lastSQLQuery, - "CREATE TABLE \"test3\" (" + + XCTAssertEqual( + self.lastSQLQuery, + ("CREATE TABLE \"test3\" (" + "\"a\" INTEGER, " + "\"b\" INTEGER, " + "\"c\" INTEGER, " + "\"d\" INTEGER, " + "PRIMARY KEY (\"a\", \"b\"), " + "FOREIGN KEY (\"c\", \"d\") REFERENCES \"test3\"(\"a\", \"b\")" + - ")") + ")") as String) } } } From 1e1b1baad538ee3fda0a8daa601353658ff1af82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 09:00:41 +0200 Subject: [PATCH 05/13] Update README about various Swift versions --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f06e59af..e24da815c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,18 @@ -GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.2-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Platforms](https://img.shields.io/cocoapods/p/GRDB.swift.svg)](https://developer.apple.com/swift/) [![License](https://img.shields.io/github/license/groue/GRDB.swift.svg?maxAge=2592000)](/LICENSE) +GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Platforms](https://img.shields.io/cocoapods/p/GRDB.swift.svg)](https://developer.apple.com/swift/) [![License](https://img.shields.io/github/license/groue/GRDB.swift.svg?maxAge=2592000)](/LICENSE) ========== ### A Swift application toolkit for SQLite databases. **Latest release**: September 8, 2016 • version 0.80.1 • [CHANGELOG](CHANGELOG.md) -**Requirements**: iOS 8.0+ / OSX 10.9+ • Xcode 7.3+ • Swift 2.2 (see the [Swift3](https://github.com/groue/GRDB.swift/tree/Swift3) branch for Swift 3). +**Requirements**: iOS 8.0+ / OSX 10.9+ • Xcode 7.3+ • Swift 2.2, 2.3, or Swift 3: + +- Swift 2.2: use the [v0.80.1 version](https://github.com/groue/GRDB.swift/tree/v0.80.1) +- Swift 2.3: use the [Swift2.3 branch](https://github.com/groue/GRDB.swift/tree/Swift2.3) +- Swift 2.3: use the [Swift3 branch](https://github.com/groue/GRDB.swift/tree/Swift3) +- Master branch is currently using Swift2.3 + +Proper Swift2.3 and Swift3 releases will ship as soon as I have dealt with Cocoapods. Follow [@groue](http://twitter.com/groue) on Twitter for release announcements and usage tips. From 98eb5640ed5b413263f5f4f0d02171e766c5c356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 09:02:19 +0200 Subject: [PATCH 06/13] Typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e24da815c..d0861ebce 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=fla - Swift 2.2: use the [v0.80.1 version](https://github.com/groue/GRDB.swift/tree/v0.80.1) - Swift 2.3: use the [Swift2.3 branch](https://github.com/groue/GRDB.swift/tree/Swift2.3) -- Swift 2.3: use the [Swift3 branch](https://github.com/groue/GRDB.swift/tree/Swift3) -- Master branch is currently using Swift2.3 +- Swift 3: use the [Swift3 branch](https://github.com/groue/GRDB.swift/tree/Swift3) +- Master branch is currently using Swift 2.3 Proper Swift2.3 and Swift3 releases will ship as soon as I have dealt with Cocoapods. From da56090604f14e868d04a3fb05a8c4793ffd952c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 09:02:45 +0200 Subject: [PATCH 07/13] Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0861ebce..3f475f49d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=fla - Swift 3: use the [Swift3 branch](https://github.com/groue/GRDB.swift/tree/Swift3) - Master branch is currently using Swift 2.3 -Proper Swift2.3 and Swift3 releases will ship as soon as I have dealt with Cocoapods. +Proper Swift 2.3 and Swift 3 releases will ship as soon as I have dealt with Cocoapods. Follow [@groue](http://twitter.com/groue) on Twitter for release announcements and usage tips. From 305ecf8a7c711fab8b1642b564cec530be5b0aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 09:10:38 +0200 Subject: [PATCH 08/13] watchOS requirement --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f475f49d..eded468fd 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=fla **Latest release**: September 8, 2016 • version 0.80.1 • [CHANGELOG](CHANGELOG.md) -**Requirements**: iOS 8.0+ / OSX 10.9+ • Xcode 7.3+ • Swift 2.2, 2.3, or Swift 3: +**Requirements**: iOS 8.0+ / OSX 10.9+ / watchOS 2.0+ • Xcode 7.3+ • Swift 2.2, 2.3, or Swift 3: - Swift 2.2: use the [v0.80.1 version](https://github.com/groue/GRDB.swift/tree/v0.80.1) - Swift 2.3: use the [Swift2.3 branch](https://github.com/groue/GRDB.swift/tree/Swift2.3) From 2af0f73473c8128fd872279955557423a964d36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 09:15:35 +0200 Subject: [PATCH 09/13] Swift 2.3 requires Xcode 8 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eded468fd..5a4b9d2e3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=fla **Latest release**: September 8, 2016 • version 0.80.1 • [CHANGELOG](CHANGELOG.md) -**Requirements**: iOS 8.0+ / OSX 10.9+ / watchOS 2.0+ • Xcode 7.3+ • Swift 2.2, 2.3, or Swift 3: +**Requirements**: iOS 8.0+ / OSX 10.9+ / watchOS 2.0+ • Xcode 8+ • Swift 2.2, 2.3, or Swift 3: - Swift 2.2: use the [v0.80.1 version](https://github.com/groue/GRDB.swift/tree/v0.80.1) - Swift 2.3: use the [Swift2.3 branch](https://github.com/groue/GRDB.swift/tree/Swift2.3) From c73965f69a24c39e97001c76f05d34f8626da337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 13:33:54 +0200 Subject: [PATCH 10/13] Fix SQLiteWatchOS module --- Support/module.modulemap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Support/module.modulemap b/Support/module.modulemap index d15a4c976..a8be34ec8 100644 --- a/Support/module.modulemap +++ b/Support/module.modulemap @@ -21,7 +21,7 @@ module SQLiteiPhoneSimulator { } module SQLiteWatchOS { - header "/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/includesqlite3.h" + header "/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/sqlite3.h" export * } From 757fbbdd88cf182e7e9ce1996f2302e4de9f418f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 13:35:36 +0200 Subject: [PATCH 11/13] v0.80.2 --- CHANGELOG.md | 11 +++++++++++ GRDB.swift.podspec | 2 +- README.md | 18 +++++++++--------- Support/Info.plist | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc25ca72f..a3c4fc8cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,19 @@ Release Notes ============= +## 0.80.2 + +Released September 9, 2016 + +**Fixed** + +- WatchOS framework + + ## 0.80.1 +Released September 8, 2016 + **Fixed** - WatchOS framework is now available through CocoaPods. diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index cc50f4a60..5c9946b19 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GRDB.swift' - s.version = '0.80.1' + s.version = '0.80.2' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A Swift application toolkit for SQLite databases.' s.homepage = 'https://github.com/groue/GRDB.swift' diff --git a/README.md b/README.md index 5f06e59af..84a7f21b9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.2-orange.svg?style=fla ### A Swift application toolkit for SQLite databases. -**Latest release**: September 8, 2016 • version 0.80.1 • [CHANGELOG](CHANGELOG.md) +**Latest release**: September 9, 2016 • version 0.80.2 • [CHANGELOG](CHANGELOG.md) **Requirements**: iOS 8.0+ / OSX 10.9+ • Xcode 7.3+ • Swift 2.2 (see the [Swift3](https://github.com/groue/GRDB.swift/tree/Swift3) branch for Swift 3). @@ -163,7 +163,7 @@ Documentation **Reference** -- [GRDB Reference](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/index.html) (on cocoadocs.org) +- [GRDB Reference](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/index.html) (on cocoadocs.org) **Getting Started** @@ -335,7 +335,7 @@ let dbQueue = try DatabaseQueue( configuration: config) ``` -See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/Configuration.html) for more details. +See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/Configuration.html) for more details. ## Database Pools @@ -415,7 +415,7 @@ let dbPool = try DatabasePool( configuration: config) ``` -See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/Configuration.html) for more details. +See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/Configuration.html) for more details. Database pools are more memory-hungry than database queues. See [Memory Management](#memory-management) for more information. @@ -1514,10 +1514,10 @@ for person in Person.fetch(db, sql, adapter: adapter) { For more information about row adapters, see the documentation of: -- [RowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Protocols/RowAdapter.html): the protocol that lets you define your custom row adapters -- [ColumnMapping](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/ColumnMapping.html): a row adapter that renames row columns -- [SuffixRowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/SuffixRowAdapter.html): a row adapter that hides the first columns of a row -- [ScopeAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Structs/ScopeAdapter.html): the row adapter that groups several adapters together to define scopes +- [RowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Protocols/RowAdapter.html): the protocol that lets you define your custom row adapters +- [ColumnMapping](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/ColumnMapping.html): a row adapter that renames row columns +- [SuffixRowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/SuffixRowAdapter.html): a row adapter that hides the first columns of a row +- [ScopeAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/ScopeAdapter.html): the row adapter that groups several adapters together to define scopes ## Raw SQLite Pointers @@ -3733,7 +3733,7 @@ let count2 = dbQueue.inDatabase { db in SQLite concurrency is a wiiide topic. -First have a detailed look at the full API of [DatabaseQueue](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Classes/DatabaseQueue.html) and [DatabasePool](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Classes/DatabasePool.html). Both adopt the [DatabaseReader](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Protocols/DatabaseReader.html) and [DatabaseWriter](http://cocoadocs.org/docsets/GRDB.swift/0.80.1/Protocols/DatabaseWriter.html) protocols, so that you can write code that targets both classes. +First have a detailed look at the full API of [DatabaseQueue](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Classes/DatabaseQueue.html) and [DatabasePool](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Classes/DatabasePool.html). Both adopt the [DatabaseReader](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Protocols/DatabaseReader.html) and [DatabaseWriter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Protocols/DatabaseWriter.html) protocols, so that you can write code that targets both classes. If the built-in queues and pools do not fit your needs, or if you can not guarantee that a single queue or pool is accessing your database file, you may have a look at: diff --git a/Support/Info.plist b/Support/Info.plist index 8f4355c43..62906927e 100644 --- a/Support/Info.plist +++ b/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.80.1 + 0.80.2 CFBundleSignature ???? CFBundleVersion From 06e74ffb474cb32b6cc61344241a1864d3c8df3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Fri, 9 Sep 2016 13:46:45 +0200 Subject: [PATCH 12/13] Update link to latest Swift2.2 version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41e7cc154..8d18d8e6a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=fla **Requirements**: iOS 8.0+ / OSX 10.9+ / watchOS 2.0+ • Xcode 8+ • Swift 2.2, 2.3, or Swift 3: -- Swift 2.2: use the [v0.80.1 version](https://github.com/groue/GRDB.swift/tree/v0.80.1) +- Swift 2.2: use the [version 0.80.2](https://github.com/groue/GRDB.swift/tree/v0.80.2) - Swift 2.3: use the [Swift2.3 branch](https://github.com/groue/GRDB.swift/tree/Swift2.3) - Swift 3: use the [Swift3 branch](https://github.com/groue/GRDB.swift/tree/Swift3) - Master branch is currently using Swift 2.3 From e49957b2b23daae52e72988a7a8f22a747884143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 10 Sep 2016 13:28:17 +0200 Subject: [PATCH 13/13] v0.81.0 --- CHANGELOG.md | 9 +++++++++ GRDB.swift.podspec | 8 +++++--- README.md | 39 ++++++++++++++++++++++----------------- Support/Info.plist | 2 +- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3c4fc8cd..cdeddd40d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Release Notes ============= +## 0.81.0 + +Released September 10, 2016 + +**New** + +- Swift 2.3 + + ## 0.80.2 Released September 9, 2016 diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index 5c9946b19..e9e3eac24 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -1,17 +1,19 @@ Pod::Spec.new do |s| s.name = 'GRDB.swift' - s.version = '0.80.2' + s.version = '0.81.0' + s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A Swift application toolkit for SQLite databases.' s.homepage = 'https://github.com/groue/GRDB.swift' s.author = { 'Gwendal Roué' => 'gr@pierlis.com' } s.source = { :git => 'https://github.com/groue/GRDB.swift.git', :tag => "v#{s.version}" } - s.source_files = 'GRDB/**/*.{h,m,swift}' s.module_name = 'GRDB' + s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.9' s.watchos.deployment_target = '2.0' - s.requires_arc = true + + s.source_files = 'GRDB/**/*.{h,swift}' s.module_map = 'Support/module.modulemap' s.framework = 'Foundation' s.library = 'sqlite3' diff --git a/README.md b/README.md index 8d18d8e6a..e0649c802 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,13 @@ GRDB.swift [![Swift](https://img.shields.io/badge/swift-2.3-orange.svg?style=fla ### A Swift application toolkit for SQLite databases. -**Latest release**: September 9, 2016 • version 0.80.2 • [CHANGELOG](CHANGELOG.md) +**Latest release**: September 10, 2016 • version 0.81.0 • [CHANGELOG](CHANGELOG.md) -**Requirements**: iOS 8.0+ / OSX 10.9+ / watchOS 2.0+ • Xcode 8+ • Swift 2.2, 2.3, or Swift 3: +**Requirements**: iOS 8.0+ / OSX 10.9+ / watchOS 2.0+ • Xcode 8+ • Swift 2.3 - Swift 2.2: use the [version 0.80.2](https://github.com/groue/GRDB.swift/tree/v0.80.2) -- Swift 2.3: use the [Swift2.3 branch](https://github.com/groue/GRDB.swift/tree/Swift2.3) +- Swift 2.3: use the [version 0.81.0](https://github.com/groue/GRDB.swift/tree/v0.81.0) - Swift 3: use the [Swift3 branch](https://github.com/groue/GRDB.swift/tree/Swift3) -- Master branch is currently using Swift 2.3 - -Proper Swift 2.3 and Swift 3 releases will ship as soon as I have dealt with Cocoapods. Follow [@groue](http://twitter.com/groue) on Twitter for release announcements and usage tips. @@ -170,7 +167,7 @@ Documentation **Reference** -- [GRDB Reference](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/index.html) (on cocoadocs.org) +- [GRDB Reference](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/index.html) (on cocoadocs.org) **Getting Started** @@ -210,17 +207,25 @@ Documentation ### Installation +GRDB requires Xcode 8 to be installed in the /Applications folder, with its regular name Xcode. + #### CocoaPods [CocoaPods](http://cocoapods.org/) is a dependency manager for Xcode projects. -To use GRDB with CocoaPods, specify in your Podfile: +Swift 2.3 requires CocoaPods 1.1+, currently in beta. Install Cocoapods beta with the following command: + +```sh +gem install cocoapods --pre +``` + +To use GRDB.swift with CocoaPods, specify in your Podfile: ```ruby source 'https://github.com/CocoaPods/Specs.git' use_frameworks! -pod 'GRDB.swift' +pod 'GRDB.swift', :git => 'git@github.com:groue/GRDB.swift', :branch => 'Swift2.3' ``` > :point_up: **Note**: [SQLCipher](#encryption) and [custom SQLite builds](#custom-sqlite-builds) are not available via CocoaPods. @@ -230,7 +235,7 @@ pod 'GRDB.swift' [Carthage](https://github.com/Carthage/Carthage) is another dependency manager for Xcode projects. -To use GRDB with Carthage, specify in your Cartfile: +To use GRDB.swift with Carthage, specify in your Cartfile: ``` github "groue/GRDB.swift" @@ -342,7 +347,7 @@ let dbQueue = try DatabaseQueue( configuration: config) ``` -See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/Configuration.html) for more details. +See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Structs/Configuration.html) for more details. ## Database Pools @@ -422,7 +427,7 @@ let dbPool = try DatabasePool( configuration: config) ``` -See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/Configuration.html) for more details. +See [Configuration](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Structs/Configuration.html) for more details. Database pools are more memory-hungry than database queues. See [Memory Management](#memory-management) for more information. @@ -1521,10 +1526,10 @@ for person in Person.fetch(db, sql, adapter: adapter) { For more information about row adapters, see the documentation of: -- [RowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Protocols/RowAdapter.html): the protocol that lets you define your custom row adapters -- [ColumnMapping](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/ColumnMapping.html): a row adapter that renames row columns -- [SuffixRowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/SuffixRowAdapter.html): a row adapter that hides the first columns of a row -- [ScopeAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Structs/ScopeAdapter.html): the row adapter that groups several adapters together to define scopes +- [RowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Protocols/RowAdapter.html): the protocol that lets you define your custom row adapters +- [ColumnMapping](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Structs/ColumnMapping.html): a row adapter that renames row columns +- [SuffixRowAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Structs/SuffixRowAdapter.html): a row adapter that hides the first columns of a row +- [ScopeAdapter](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Structs/ScopeAdapter.html): the row adapter that groups several adapters together to define scopes ## Raw SQLite Pointers @@ -3740,7 +3745,7 @@ let count2 = dbQueue.inDatabase { db in SQLite concurrency is a wiiide topic. -First have a detailed look at the full API of [DatabaseQueue](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Classes/DatabaseQueue.html) and [DatabasePool](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Classes/DatabasePool.html). Both adopt the [DatabaseReader](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Protocols/DatabaseReader.html) and [DatabaseWriter](http://cocoadocs.org/docsets/GRDB.swift/0.80.2/Protocols/DatabaseWriter.html) protocols, so that you can write code that targets both classes. +First have a detailed look at the full API of [DatabaseQueue](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Classes/DatabaseQueue.html) and [DatabasePool](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Classes/DatabasePool.html). Both adopt the [DatabaseReader](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Protocols/DatabaseReader.html) and [DatabaseWriter](http://cocoadocs.org/docsets/GRDB.swift/0.81.0/Protocols/DatabaseWriter.html) protocols, so that you can write code that targets both classes. If the built-in queues and pools do not fit your needs, or if you can not guarantee that a single queue or pool is accessing your database file, you may have a look at: diff --git a/Support/Info.plist b/Support/Info.plist index 62906927e..1c53231a4 100644 --- a/Support/Info.plist +++ b/Support/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.80.2 + 0.81.0 CFBundleSignature ???? CFBundleVersion