Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.78k stars 1.41k forks source link

WCDBOptimizedSQLCipher,执行下面这个函数,报错no such function sqlcipher_export,用普通版本的sqlcipher是可以的 #1134

Closed Ronnydalinseri closed 2 months ago

Ronnydalinseri commented 2 months ago

The language of WCDB

Objective-C

The version of WCDB

2.1.6

The platform of WCDB

iOS

The installation of WCDB

Cocoapods

What's the issue?

WCDB包含的sqlcipher,执行下面这个函数,报错no such function sqlcipher_export,用普通版本的sqlcipher是可以的

sqlite3_exec(unencrypted_DB, "SELECT sqlcipher_export('encrypted');", NULL, NULL, &errmsg);

Qiuwen-chen commented 2 months ago

It is OK here. If you can not solve it, you can give me a demo project to reproduce this problem.

Ronnydalinseri commented 2 months ago

Thank you. This is My Demo. 当在主页调用encrypt时,会报错no such function,需要把podfile改成 pod 'FMDB/SQLCipher',才能解决问题,并且我发现分开写pod 'FMDB', pod 'SQLCipher'也会有WCDB同样的问题 sqlcipherDemo-master 2.zip

Qiuwen-chen commented 2 months ago

You are actually using the sqlite provided by the system. Unlink it and use -[WCTDatabase execute:] instead.