run on Xcode9

just update Xcode9 and found this issue please help thx
H @furueili ! Fmdb does not support xcode9 + ios11 yet. I'm waiting fix too.
Are you using Cocoapods to include FMDB in your project, and are you also attempting to use SQLCipher? If so, you may find this helpful:
https://discuss.zetetic.net/t/ios-11-xcode-issue-implicit-declaration-of-function-sqlite3-key-is-invalid-in-c99/2198/27
The error suggests sqlite3.h is not in your header search paths (or, that the sqlite3.h that is being used is not the SQLCipher version including the symbols sqlite3_key, sqlite3_rekey, etc)
hi @billymeltdown . Thank you for answer. Yes, i use SQLCipher. I tried it hack, and application was compiled. But i'm getting crash:
libc++abi.dylib: terminating with uncaught exception of type NSException
My podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
abstract_target 'defaults' do
pod 'SQLCipher', :inhibit_warnings => true
pod 'FMDB/SQLCipher', :git => 'https://github.com/ccgus/fmdb'
target 'DB'
target 'Example'
end
post_install do | installer |
print "SQLCipher: link Pods/Headers/sqlite3.h"
system "mkdir -p Pods/Headers/Private && ln -s ../../SQLCipher/sqlite3.h Pods/Headers/Private"
end
@billymeltdown thk. Hack works fine! It was problem of my code.
Unfortunately, this post_install hook no longer seems to do the trick with the latest version of cocoa pods and Xcode. This post_install hook to add SQLCipher to the HEADER_SEARCH_PATHS of FMDB should do the trick now:
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 as this post_install hook within the SQLCipher subspec of the podspec.
https://github.com/ccgus/fmdb/commit/18152d3ea819d5a65a682ad9f3b22dbbb3c2423e was merged in with the adjustment to the SQLCipher subspec
That should resolve this issue and no longer require the post_install hook workaround