Browse Source

Change flag to SQLCIPHER_CRYPTO

jason 6 years ago
parent
commit
08daa09460
2 changed files with 2 additions and 2 deletions
  1. 1 1
      FMDB.podspec
  2. 1 1
      src/fmdb/FMDatabase.m

+ 1 - 1
FMDB.podspec

@@ -43,7 +43,7 @@ Pod::Spec.new do |s|
     ss.dependency 'SQLCipher', '~> 4.0'
     ss.dependency 'SQLCipher', '~> 4.0'
     ss.source_files = 'src/fmdb/FM*.{h,m}'
     ss.source_files = 'src/fmdb/FM*.{h,m}'
     ss.exclude_files = 'src/fmdb.m'
     ss.exclude_files = 'src/fmdb.m'
-    ss.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC -DHAVE_USLEEP=1', 'HEADER_SEARCH_PATHS' => 'SQLCipher' }
+    ss.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC -DHAVE_USLEEP=1 -DSQLCIPHER_CRYPTO', 'HEADER_SEARCH_PATHS' => 'SQLCipher' }
   end
   end
   
   
 end
 end

+ 1 - 1
src/fmdb/FMDatabase.m

@@ -497,7 +497,7 @@ - (BOOL)goodConnection {
         return NO;
         return NO;
     }
     }
     
     
-#ifdef SQLITE_HAS_CODEC
+#ifdef SQLCIPHER_CRYPTO
     // Starting with Xcode8 / iOS 10 we check to make sure we really are linked with
     // Starting with Xcode8 / iOS 10 we check to make sure we really are linked with
     // SQLCipher because there is no longer a linker error if we accidently link
     // SQLCipher because there is no longer a linker error if we accidently link
     // with unencrypted sqlite library.
     // with unencrypted sqlite library.