# SQLCipher build for xcode16

**URL:** <https://discuss.zetetic.net/t/sqlcipher-build-for-xcode16/6922>\
**Category:** Issues\
**Created:** [May 17, 2025, 8:40am UTC](https://discuss.zetetic.net/t/sqlcipher-build-for-xcode16/6922 "2025-05-17T08:40:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alimkhan\_Zhanbekov](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/alimkhan_zhanbekov/32/2408_2.png) [@Alimkhan\_Zhanbekov](https://discuss.zetetic.net/u/Alimkhan_Zhanbekov)\
**Post date:** [May 17, 2025, 8:40am UTC](https://discuss.zetetic.net/t/sqlcipher-build-for-xcode16/6922/1 "2025-05-17T08:40:43Z")

</div>

![Screenshot 2025-05-17 at 13.38.16](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/2X/4/4369ac035005658c35290ace62ce83710aeb84a1.png)

I’m having trouble integrating SQLCipher into my project using Xcode 16. I encountered many errors during the build process. I studied the podspec file, extracted the CFLAGS from it, and applied them with the `./configure` script. Then I ran `make sqlite3.c`. However, when I add the generated files to my Xcode project, the build fails.

Could you help me fix this or suggest a better way to integrate SQLCipher with Xcode 16?  
CFlags and macros in Xcode is also added

---

<div class="post-metadata">

**Author:** ![mmoore](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/mmoore/32/858_2.png) [@mmoore](https://discuss.zetetic.net/u/mmoore)\
**Post date:** [May 19, 2025, 8:14pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-for-xcode16/6922/2 "2025-05-19T20:14:59Z")

</div>

Hi @Alimkhan_Zhanbekov

Thanks for your interest in SQLCipher and for posting to the discussion forum.

We were able to reproduce the issue using the instructions on the SQLCipher for iOS/macOS community integration page here: [SQLCipher Community Edition - Adding Full Database Encryption for SQLite to iOS and macOS | Zetetic](https://www.zetetic.net/sqlcipher/ios-tutorial/)

Adding these two CFlags:

```auto
-DSQLCIPHER_CRYPTO_CC
-DNDEBUG

```

So the the complete CFlags are:

```auto
-DSQLITE_HAS_CODEC 
-DSQLITE_TEMP_STORE=2 
-DSQLITE_THREADSAFE=1 
-DSQLITE_EXTRA_INIT=sqlcipher_extra_init 
-DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown
-DSQLCIPHER_CRYPTO_CC
-DNDEBUG

```

Should allow you to integrate SQLCipher from source in your Xcode project.

Let me know if this fixes the errors for you.

We’ll update the documentation on the page linked to include the extra required CFlags.

---

<div class="post-metadata">

**Author:** ![Alimkhan\_Zhanbekov](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/alimkhan_zhanbekov/32/2408_2.png) [@Alimkhan\_Zhanbekov](https://discuss.zetetic.net/u/Alimkhan_Zhanbekov)\
**Post date:** [May 25, 2025, 4:45pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-for-xcode16/6922/3 "2025-05-25T16:45:38Z")

</div>

Thank you for the answer, everything is works now
