# CoreServices not found: CMake build deploying on iOS 10 device

**URL:** <https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618>\
**Category:** MacOSX and iOS\
**Created:** [April 20, 2021, 11:37am UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618 "2021-04-20T11:37:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [April 20, 2021, 11:37am UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/1 "2021-04-20T11:37:48Z")

</div>

I’m having trouble running a standalone plugin build on an iOS 10 device (iPad mini), with the Xcode project generated by CMake. I’ve fixed various compiler and architecture settings for the relevant targets. Now I’m stuck on the following runtime error complaining about CoreServices.framework being missing:

```auto
dyld: Library not loaded: /System/Library/Frameworks/CoreServices.framework/CoreServices
  Referenced from: /var/containers/Bundle/Application/6274125D-8814-4CE1-B3E5-2BEE949AA20F/MyCoolPlugin.app/MyCoolPlugin
  Reason: image not found

```

I’ve tried manually adding it (via Xcode) to both the main standalone target and the shared code target. However I understand that CMake should be setting the linker flag automagically.

This works fine on the simulator, and with a more recent iOS device (running iOS 13)

I’m on JUCE 6.0.7, Xcode 12.4

Any help with this would be much appreciated!

---

<div class="post-metadata">

**Author:** ![mcmartin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mcmartin/32/7432_2.png) [@mcmartin](https://forum.juce.com/u/mcmartin)\
**Post date:** [April 20, 2021, 2:24pm UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/2 "2021-04-20T14:24:31Z")

</div>

Maybe related to

> <https://github.com/juce-framework/JUCE/commit/7c46c45dcddaf1798d0eb616cb70485bdb256532>

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [April 20, 2021, 2:28pm UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/3 "2021-04-20T14:28:04Z")

</div>

I wondered that. I tried changing it back to MobileCoreServices in regenerating and rebuilding the project but I still got the missing CoreServices error.

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 20, 2021, 4:15pm UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/4 "2021-04-20T16:15:15Z")

</div>

Unfortunately I don’t have an iOS 10 device here for testing. Can you hack stuff around and try passing `-weak_framework CoreServices` rather than just `-framework CoreServices`? I think there’s a chance that might work.

---

<div class="post-metadata">

**Author:** ![adamwilson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/adamwilson/32/1387_2.png) [@adamwilson](https://forum.juce.com/u/adamwilson)\
**Post date:** [April 21, 2021, 9:42am UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/5 "2021-04-21T09:42:29Z")

</div>

> [@reuk](#):
>
> `-weak_framework CoreServices`

That sorted it!! Thanks!! Now, how do we make that part of the build process..?

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 21, 2021, 9:44am UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/6 "2021-04-21T09:44:46Z")

</div>

Thanks for the update, I’ll have a think about this today. Perhaps we can special-case this framework so that it is linked weakly, depending on the deployment target.

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 21, 2021, 11:27am UTC](https://forum.juce.com/t/coreservices-not-found-cmake-build-deploying-on-ios-10-device/45618/7 "2021-04-21T11:27:52Z")

</div>

I’ve pushed this change, which should resolve the issue. Please let us know if you encounter any other problems.

> <https://github.com/juce-framework/JUCE/commit/cb399a57ffaff27051c70cd361b00b3f2ae4366a>
