td icon indicating copy to clipboard operation
td copied to clipboard

SQLite library in TDLib conflicts to FCM' SQLite library

Open k0ry opened this issue 3 years ago • 2 comments

Hello, on iOS projects there is conflict with SQLite library in TDLib and Googles Firebase (FCM)' SQLite library, causing runtime error: onError Error(code: 400, message: "[query:SELECT sqlcipher_export('encrypted')] to database " /Library/Caches/tdlib/db.sqlite" failed: no such function: sqlcipher_export")

How to resolve this issue?

k0ry avatar Jun 11 '22 07:06 k0ry

Are FCM and TDLib built as different dylib libraries and linked dynamically?

levlam avatar Jun 11 '22 13:06 levlam

Stumbled across this issue report and just wanted to mention that I too encountered an sqlite3 conflict between tdlib and another component (in my case sqlite3 from go). I had already modularized my code into shared libs, but in order to resolve the issue I had to switch to library loading at runtime, rather than linking them directly. For my project it resulted in the following commit https://github.com/d99kris/nchat/commit/fd0709c3 but the essence was to use dlopen() rather than linking at build time. Just wanted to share in case it's of any help. I have no iOS experience, so it might be completely inapplicable.

d99kris avatar Jul 14 '22 14:07 d99kris

Should be fixed by https://github.com/tdlib/td/commit/110ef61861e8435d07cb844a2ea2cec0af131fab as mentioned in chat

Kylmakalle avatar Sep 10 '22 11:09 Kylmakalle