wcdb
wcdb copied to clipboard
Fix WCDB build issue for Swift user, allow CocoaPods user to use WCDB.swift without any issue
This PR fix many issues about current's WCDB Swift project configfuration.
- The
pod_target_xcconfig
override theOTHER_SWIFT_FLAGS
, which will remove the CocoaPods's injected modulemap path, cause import error when compile Swift source files.
- The Swift code loss the symbol
sqliterk_cipher_conf_set_key
, which seems be the oldsqliterk
API. I added this one into theSQLite-Briding.h
- Fix the non framework type (For example, CocoaPods by default use Static Library without framework) build issue. I replace the
<WCDBSwift/SQLite-Bridging.h>
into"SQLite-Bridging.h"
to make both compatible foruse_frameworks!
or not.
- Also, update the git submodule of
sqlcipher
. It seems the upstream already provided one Xcode project which can build. I just change the currentswift/source/util/sqlcipher.xcodeproj
reference with the symbolicedsqlcipher/sqlcipher.preprocessed.xcodeproj
, make it compilable by openingWCDB.swift.xcworkspace
After those changes above. I can easily build any Swift Demo by using the Podfile like this:
use_modular_headers!
target 'Example' do
pod 'WCDB.swift', :git => 'https://github.com/dreampiggy/wcdb.git', :branch => 'fix_swift'
end
Provided one demo here: https://github.com/dreampiggy/WCDBSwiftDemo
Now just pod install
and build just works :
Wait for your reply :)
CC @RingoD @John-He-928
New version of WCDB Swift is released, thanks.