添加SQLCipher 到项目中

文章目录

SQLCipher官方地址

一、克隆下载SQLCipher

复制代码
$ cd ~/Documents/code
$ git clone https://github.com/sqlcipher/sqlcipher.git

二、手动导入

1. 生成sqlite3.c

打开下载的SQLCipher,运行脚本命令

复制代码
$ cd sqlcipher
$ ./configure --with-crypto-lib=none
$ make sqlite3.c

sqlite3.csqlite3.h 导入到项目中

2. 在项目中添加命令

  1. 在build setting 中 "Other C Flags." 下添加如下命令:
    -DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=3 -DSQLCIPHER_CRYPTO_CC -DNDEBUG.
  1. 如果是swift项目添加"Preprocessor Macros"的 Release settings 下添加 SQLITE_HAS_CODEC=1

3. 添加 Security.framework

在Link Binary With Libraries添加 Security.framework

三、CocoaPods导入

Podfile 文件添加下列内容

复制代码
platform :ios, '10.0'

target 'SQLCipherApp' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  pod 'SQLCipher', '~>4.0'
end
相关推荐
北极象10 小时前
千问大模型接入示例
ios·iphone·qwen
ipad协议开发12 小时前
企业微信 iPad 协议应用机器人开发
ios·企业微信·ipad
QuantumLeap丶1 天前
《Flutter全栈开发实战指南:从零到高级》- 26 -持续集成与部署
android·flutter·ios
2501_915918411 天前
TCP 抓包分析在复杂网络问题中的作用,从连接和数据流层面理解系统异常行为
网络·网络协议·tcp/ip·ios·小程序·uni-app·iphone
二流小码农1 天前
鸿蒙开发:个人开发者如何使用华为账号登录
android·ios·harmonyos
wvy1 天前
Xcode 26还没有适配SceneDelegate的app建议尽早适配
ios
游戏开发爱好者82 天前
苹果 App 上架流程,结合 Xcode、CI 等常见工具
macos·ios·ci/cd·小程序·uni-app·iphone·xcode
前端老白2 天前
webview在微信小程序中,安卓加载失败,IOS正常加载
android·ios·微信小程序·webview
2501_915106322 天前
用 HBuilder 上架 iOS 应用时如何管理Bundle ID、证书与描述文件
android·ios·小程序·https·uni-app·iphone·webview
2501_915909062 天前
资源文件混淆在 iOS 应用安全中的实际价值
android·安全·ios·小程序·uni-app·iphone·webview