SQLCipher into swift framework

Trying to import sqlcipher into my iOS swift FRAMEWORK but failed to succeed

Hi @ruqiya

Did you receive a compiler error, or a runtime issue? Can you share a bit more about the problem you are having?

Hi,

I have a swift framework to which I need to add the sqlcipher. The steps mentioned in the site seem for an iOS application. In framework there will be no bridging header to include the header file, where and how can I import the sqlcipher into a framework?

I try using sqlite3_rekey() which gives error as undefined.

Hello @ruqiya

To use the keying API used within SQLCipher you will need to define -DSQLITE_HAS_CODEC in your CFLAGS. Can you add that and let us know your results?

Hi, I am seeing the same error, even after I define -DSQLITE_HAS_CODEC in CFLAGS.

@guna

Thanks for your support of SQLCipher and reaching out. We’ve responded to your private support request email.

For anyone else looking on, if you’re using SQLCipher with Swift you’ll also want to include the preprocessor macros for SQLITE_HAS_CODEC=1 as described in the integration instructions here: SQLCipher for iOS and Mac Catalyst - Zetetic and if you’re a commercial/enterprise licensee, feel free to reach out to us at support@zetetic.net if you’re attempting to use SQLCipher within your own (internal) Framework and we’ll be happy to help.

Hi, I’m having trouble with that integration as well.
I followed all the steps in the guides and the SQLCipher is the only pod I’m using in my framework.
I managed to integrate it successfully into an app project, but the framework gives the redefinition errors :thinking: