# Integration on iOS with extension targets

**URL:** <https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525>\
**Category:** SQLCipher\
**Created:** [December 12, 2017, 4:12pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525 "2017-12-12T16:12:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcoyle](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tcoyle](https://discuss.zetetic.net/u/tcoyle)\
**Post date:** [December 12, 2017, 4:12pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/1 "2017-12-12T16:12:38Z")

</div>

I am in the process of adding dynamic notifications to my iOS project, but after adding the new service and content notification targets, I am now getting the following errors for those targets

clang: error: no such file or directory: ‘/Users/user/Library/Developer/Xcode/DerivedData/Project-fszajszifrpxyrflmsoducbdvwxp/Build/Products/DebugDEV-iphoneos/libsqlcipher.a’

The error is coming from the linking in the notification service target, however I have no explicitly linked sqlcipher to this target, nor do I have any use for it in either new target. So my question is, how do I handle this in my project?

---

<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:** [December 12, 2017, 5:08pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/2 "2017-12-12T17:08:55Z")

</div>

@tcoyle

Without seeing your project setup, my initial guess would be that you have

```auto
"Other Linker Flags" = $(BUILT_PRODUCTS_DIR)/libsqlcipher.a

```

set at the project level Build Settings (so it’s inherited by each target within that project) and because you’re not linking libsqlcipher.a in this target it’s not present at that location as the clang error states.

To resolve this, you should be able to select the _target’s_ Build Settings and delete this “Other Linker Flag” as it’s not needed unless you’re linking SQLCipher to that target.

Let me know if this resolves the issue for you.

Cheers,  
Micah

---

<div class="post-metadata">

**Author:** ![tcoyle](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tcoyle](https://discuss.zetetic.net/u/tcoyle)\
**Post date:** [December 12, 2017, 5:44pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/3 "2017-12-12T17:44:43Z")

</div>

That did the trick! Thanks for the fast response

---

<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:** [December 12, 2017, 5:49pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/4 "2017-12-12T17:49:38Z")

</div>

@tcoyle

Great, glad to hear that resolved the issue for you.

---

<div class="post-metadata">

**Author:** ![michaelkirk](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/michaelkirk/32/739_2.png) [@michaelkirk](https://discuss.zetetic.net/u/michaelkirk)\
**Post date:** [December 29, 2017, 5:18am UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/5 "2017-12-29T05:18:10Z")

</div>

@tcoyle - were you able to keep your app from being terminated when launching a separate extension?

e.g. see this issue which reports the main app is killed when beings suspended - seemingly because sqlcipher doesn’t abide by the iOS restrictions around shared containers.

> <https://github.com/sqlcipher/sqlcipher/issues/255>

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [December 29, 2017, 1:30pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/6 "2017-12-29T13:30:48Z")

</div>

Hi @michaelkirk

> [@michaelkirk](#):
>
> e.g. see this issue which reports the main app is killed when beings suspended - seemingly because sqlcipher doesn’t abide by the iOS restrictions around shared containers.

We are actively debugging this specific scenario. Currently it appears that there may be an issue in upstream SQLite. As @sjlombardo [mentioned](https://github.com/sqlcipher/sqlcipher/issues/255#issuecomment-353480755) in the Github ticket, we have implemented a minimal codec that does not utilize SQLCipher at all, when that is used, in conjunction with WAL mode, the crash still occurs. We will update that ticket when we have more definitive information to share.

---

<div class="post-metadata">

**Author:** ![tcoyle](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@tcoyle](https://discuss.zetetic.net/u/tcoyle)\
**Post date:** [December 29, 2017, 1:57pm UTC](https://discuss.zetetic.net/t/integration-on-ios-with-extension-targets/2525/7 "2017-12-29T13:57:44Z")

</div>

I do not utilize any additional extensions outside of notifications. And those do not access the database. No issues with background crashing that I’ve observed yet, but still in active development.
