diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index db29b7bc5..ee1374c2c 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -13,24 +13,8 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.9' s.watchos.deployment_target = '2.0' + s.source_files = 'GRDB/**/*.swift', 'Support/*.{c,h}' s.module_map = 'Support/module.modulemap' s.framework = 'Foundation' - s.default_subspec = 'default' - - s.subspec 'default' do |ss| - ss.source_files = 'GRDB/**/*.swift', 'Support/*.{c,h}' - ss.library = 'sqlite3' - end - - s.subspec 'SQLCipher' do |ss| - ss.source_files = 'GRDB/**/*.swift', 'Support/*.{c,h}' - ss.exclude_files = 'Support/sqlite3.h' - ss.xcconfig = { - 'OTHER_SWIFT_FLAGS' => '$(inherited) -DSQLITE_HAS_CODEC -DUSING_SQLCIPHER', - 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC', - 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) SQLITE_HAS_CODEC=1' - } - - ss.dependency 'SQLCipher', '>= 3.4.0' - end + s.library = 'sqlite3' end diff --git a/GRDBCipher.podspec b/GRDBCipher.podspec new file mode 100644 index 000000000..77b0ae533 --- /dev/null +++ b/GRDBCipher.podspec @@ -0,0 +1,25 @@ +Pod::Spec.new do |s| + s.name = 'GRDBCipher' + s.version = '0.107.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.module_name = 'GRDBCipher' + + s.ios.deployment_target = '8.0' + s.osx.deployment_target = '10.9' + s.watchos.deployment_target = '2.0' + + s.source_files = 'GRDB/**/*.swift', 'SQLCipher/*.h', 'Support/grdb_config.{c,h}' + s.module_map = 'SQLCipher/module.modulemap' + s.xcconfig = { + 'OTHER_SWIFT_FLAGS' => '$(inherited) -DSQLITE_HAS_CODEC -DUSING_SQLCIPHER', + 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC -DUSING_SQLCIPHER', + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) SQLITE_HAS_CODEC=1' + } + s.framework = 'Foundation' + s.dependency 'SQLCipher', '~> 3.4.0' +end diff --git a/SQLCipher/GRDBCipher.h b/SQLCipher/GRDBCipher.h index dda719bde..82d9edb59 100644 --- a/SQLCipher/GRDBCipher.h +++ b/SQLCipher/GRDBCipher.h @@ -8,4 +8,8 @@ FOUNDATION_EXPORT const unsigned char GRDB_VersionString[]; #define SQLITE_HAS_CODEC #import -#import +#ifdef COCOAPODS + #import +#else + #import +#endif diff --git a/Support/GRDB.h b/Support/GRDB.h index 2f7dc1257..2bd4d1b5d 100644 --- a/Support/GRDB.h +++ b/Support/GRDB.h @@ -7,9 +7,4 @@ FOUNDATION_EXPORT double GRDB_VersionNumber; FOUNDATION_EXPORT const unsigned char GRDB_VersionString[]; #import - -#if SQLITE_HAS_CODEC && defined(COCOAPODS) - #import -#else - #import -#endif +#import diff --git a/Support/grdb_config.c b/Support/grdb_config.c index 6273ad34d..3a75f975c 100644 --- a/Support/grdb_config.c +++ b/Support/grdb_config.c @@ -1,7 +1,8 @@ -#include -#if SQLITE_HAS_CODEC && defined(COCOAPODS) +#if USING_SQLCIPHER && defined(COCOAPODS) + #include #include #else + #include #include #endif