在升级了Cocoapods 到 1.5 以后, pod install
后, 编译报错:
Implicit declaration of function ‘sqlite3_key’ is invalid in C99
Implicit declaration of function ‘sqlite3_rekey’ is invalid in C99
但 Other Link Flag 之类的都已经设置好了, 仍然报错, 最终找到解决方案如下:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testPodFMDB' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testPodFMDB
pod 'FMDB/SQLCipher'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "FMDB"
config_path = target.build_configurations[0].base_configuration_reference.real_path
File.open(config_path, "a") {|file| file.write("HEADER_SEARCH_PATHS = SQLCipher")}
end
end
end
end