# SQLCipher API for iOS never be called

**URL:** <https://discuss.zetetic.net/t/sqlcipher-api-for-ios-never-be-called/1627>\
**Category:** SQLCipher\
**Created:** [August 27, 2016, 7:05am UTC](https://discuss.zetetic.net/t/sqlcipher-api-for-ios-never-be-called/1627 "2016-08-27T07:05:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snake7788](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@snake7788](https://discuss.zetetic.net/u/snake7788)\
**Post date:** [August 27, 2016, 7:05am UTC](https://discuss.zetetic.net/t/sqlcipher-api-for-ios-never-be-called/1627/1 "2016-08-27T07:05:06Z")

</div>

I use FMDB+SQLCipher from CocoaPods. I m sure all the settings about it is correct because i do it again in another project in the same way. Look at this:

 ![](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/1X/e22931e37dfbb2f55308660937126148f61700ab.png)

when I call the encrypted method it return no. Who can help me solve the problem?

---

<div class="post-metadata">

**Author:** ![snake7788](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@snake7788](https://discuss.zetetic.net/u/snake7788)\
**Post date:** [August 27, 2016, 7:12am UTC](https://discuss.zetetic.net/t/sqlcipher-api-for-ios-never-be-called/1627/2 "2016-08-27T07:12:33Z")

</div>

and I wonder how -DSQLITE\_HAS\_CODEC in other c flags works in Xcode, why not use the macro in the sqlite.h or sqlite.c ?

---

<div class="post-metadata">

**Author:** ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)\
**Post date:** [August 30, 2016, 2:48pm UTC](https://discuss.zetetic.net/t/sqlcipher-api-for-ios-never-be-called/1627/3 "2016-08-30T14:48:18Z")

</div>

Hello @snake7788 - Based on the description you’ve provided it is not clear that this is an issue with SQLCipher. In this case you are invoking the SQLCipher API through FMDB, integrated using their cocoapod. It would make the most sense to investigate FMDB or raise an issue with their support first to rule out an issue there.

---

<div class="post-metadata">

**Author:** ![snake7788](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@snake7788](https://discuss.zetetic.net/u/snake7788)\
**Post date:** [September 2, 2016, 1:18am UTC](https://discuss.zetetic.net/t/sqlcipher-api-for-ios-never-be-called/1627/4 "2016-09-02T01:18:32Z")

</div>

@sjlombardo Thanks for your reply. I guess it has nothing to do with FMDB. In FMDB it call setkey(an API) to call the encrpted function sqlite3\_key.

 ![](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/1X/4454f52aa0f5b56c2d9b344125e4521c4a66132f.png)

There is problem in this very project.But If I create a new project it works well.  
Perhaps some settings in Xcode is not correct. I have to think of anthoer way.
