fmdb icon indicating copy to clipboard operation
fmdb copied to clipboard

Replacement for #401: Update podspec for SQLCipher+fts3

Open evands opened this issue 8 years ago • 11 comments

It turned out to be significantly easier and clearer to just create a new branch and pull request for this fix. The first commit just simplifies the podspec to use dependencies to deduplicate code; the second adds FMDB/SQLCipher/FTS3

evands avatar Jun 08 '16 02:06 evands

@stephanheilner - can you quickly review this (since you seem to use cocoa pods) and let me know if it looks OK?

ccgus avatar Jun 08 '16 16:06 ccgus

I added some suggestions and made some comments inline.

stephanheilner avatar Jun 08 '16 17:06 stephanheilner

@stephanheilner: Please see [300d0fe] and let me know if you have any further suggestions. I think we've got a much cleaner podspec now as a result of these efforts.

evands avatar Jun 09 '16 00:06 evands

Finally, we'll need to bump the podfile version number and have a corresponding git tag, once this is approved.

evands avatar Jun 09 '16 00:06 evands

So everyone is happy with this now? All I need to do is commit it?

ccgus avatar Jun 10 '16 19:06 ccgus

We'll need to update the version from 2.6.2 to whatever the next tag version will be, but we can do that right before @ccgus creates a new tag. Just give me a heads up, so I can make sure you bump the version in this file as well first.

stephanheilner avatar Jun 11 '16 04:06 stephanheilner

I'm having difficulty with custom tokenizers working in SQLCipher+FTS. Please don't commit yet -- investigating.

evands avatar Jun 12 '16 19:06 evands

OK, I figured out the problem but don't have an immediate solution. @stephanheilner would love your input.

  • SQLCipher needs to be compiled with -DDSQLITE_ENABLE_FTS3_TOKENIZER for custom tokenizers to work. Adding this in our podspec doesn't change how the dependency is compiled so doesn't fix the problem.
  • Maybe should be done in the SQLCipher podspec file I think but I can't find a source podspec in their github repo to make a pull request

evands avatar Jun 12 '16 20:06 evands

Just wondering if this branch is still being worked on.

pleasantnicholasb avatar Feb 06 '17 17:02 pleasantnicholasb

I concluded it probably needs to be fixed at the level of SQLCipher if it is to be properly done and couldn't find anywhere to do that. I've just added this to my Podfile:

post_install do |installer|
 puts "Post-Install: Enabling SQLITE_ENABLE_FTS3_TOKENIZER for SQLCipher..."	
  sqlcipher_targets = installer.pods_project.targets.select { |target| target.name =~ /^SQLCipher$/ }
  sqlcipher_targets.each do |target|
        target.build_configurations.each do |config|
            old_defines = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] || []
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = old_defines + ['$(inherited) SQLITE_ENABLE_FTS3_TOKENIZER=1']
        end
    end
end

evands avatar Feb 12 '17 21:02 evands

-DDSQLITE_ENABLE_FTS3_TOKENIZER is not required because you can enable custom tokenizers by following code: sqlite3_db_config(sqliteHandle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);

RishatShamsutdinov avatar Nov 15 '17 09:11 RishatShamsutdinov