ccgus / fmdb

A Cocoa / Objective-C wrapper around SQLite
Other
13.84k stars 2.76k forks source link

FMDB/SQLCipher issue on Xcode 9 #618

Open zhoufusong opened 6 years ago

zhoufusong commented 6 years ago

s.dependency 'FMDB/SQLCipher', '~> 2.7.2' in podspec of other pod library. it cannot build successful. also the reason is that sqlite3_key and sqlite3_rekey is missed

cyl123 commented 6 years ago

我也遇到了这个问题,解决了么?

suweiz19890921 commented 6 years ago

I have this problem too.

R4N commented 6 years ago

You could try this post_install hook in your Podfile to add SQLCipher to the HEADER_SEARCH_PATHS which will ensure that FMDB finds the correct SQLCipher copy of sqlite3.h

post_install do |installer|
        installer.pods_project.targets.each do |target|
            if target.name == "FMDB"
               target.build_configurations.each do |config|
                   header_search = {"HEADER_SEARCH_PATHS" => "SQLCipher"}
                   config.build_settings.merge!(header_search)
               end
            end
        end
    end

I've issued a PR which should hopefully accomplish the same thing within the SQLCipher subspec of the podspec.

R4N commented 6 years ago

https://github.com/ccgus/fmdb/commit/18152d3ea819d5a65a682ad9f3b22dbbb3c2423e was merged in which I'm hopeful will resolve this issue.

@zhoufusong @cyl123 @suweiz19890921

Does it work for you guys with the latest?