gpt4 book ai didi

sqlite - 将 firebase 与 SQLCipher 一起使用

转载 作者:行者123 更新时间:2023-12-03 19:31:27 25 4
gpt4 key购买 nike

我有一个使用 SQLCipher 读取和写入加密数据库的应用程序。

想要使用 Firebase,我偶然发现了 2 个问题:

首先,添加了一些...的东西-l"sqlite3"给我的Pods/Target Support Files/Pods-ProjectName/Pods-ProjectName.debug.xcconfig (和 release 也是,ofc)。因此,我的应用程序的 SQL 失败并出现错误 file is encrypted or is not a database .

我通过添加 post_install 解决了这个问题给我的Podfile从所有配置文件中删除那些。

执行此操作后,Firebase SQL 开始失败并出现错误 no such table: s2dRmqIds .

AFAIK,没有办法在同一个项目中使用 SQLite 和 SQLCipher,因为它们是互补的。

知道 Firebase 试图在该表中保存什么吗?或者问题有多大?或者如果我可以改变存储机制?或者如果它是一个(已知的)错误?

最佳答案

我创建了一个安装后脚本,从 firebase pod 中删除 -l"sqlite3"其他链接器标志,它有帮助!

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
new_xcconfig = xcconfig.gsub('-l"sqlite3"', '')
File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
end
end
end

关于sqlite - 将 firebase 与 SQLCipher 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40529577/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com