# Can't run the Kitura chapter 2 app within Xcode

**URL:** <https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519>\
**Category:** Server Side Swift with Kitura\
**Created:** [January 4, 2020, 10:27pm UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519 "2020-01-04T22:27:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianbooth67](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/adrianbooth67/32/81494_2.png) [@adrianbooth67](https://forums.kodeco.com/u/adrianbooth67)\
**Post date:** [January 4, 2020, 10:27pm UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519/1 "2020-01-04T22:27:52Z")

</div>

I have followed the instructions in chapter 2 to create the Kitura server and have even downloaded the source but I get the same error. I can run the application from the command line and I can run the application within Docker but if I try to run the application within Xcode I get the following error.

**dyld: Library not loaded: @rpath/agentcore.framework/Versions/A/agentcore**

**Referenced from: /Users/adrianbooth67/Library/Developer/Xcode/DerivedData/EmojiJournalServer-gkgotzcmfpswikgrtfudlrmihnag/Build/Products/Debug/EmojiJournalServer**

**Reason: image not found**

**Program ended with exit code: 9**

I have updated brew without any difference. Clearly I want to be able to use the IDE within Xcode so am keen to understand what I am doing wrong.

---

<div class="post-metadata">

**Author:** ![denisthemenace](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/denisthemenace/32/108856_2.png) [@denisthemenace](https://forums.kodeco.com/u/denisthemenace)\
**Post date:** [February 7, 2020, 2:14pm UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519/2 "2020-02-07T14:14:06Z")

</div>

I have the same problem! Dear authors of the book, please advice how can we run the app from Xcode. Your help will be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [February 8, 2020, 1:14am UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519/3 "2020-02-08T01:14:57Z")

</div>

hi Denis and @adrianbooth67! The authors are IBM employees who have been redeployed, now that IBM is stepping back from Kitura.

I get the same error when I build and run in Xcode. This is probably an Xcode issue, which might resolve itself in a future release.

In the meantime, I think `swift run` in **Terminal** should work, whenever the book says to build and run. Please let me know if it doesn’t?

---

<div class="post-metadata">

**Author:** ![adrianbooth67](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/adrianbooth67/32/81494_2.png) [@adrianbooth67](https://forums.kodeco.com/u/adrianbooth67)\
**Post date:** [February 9, 2020, 9:12pm UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519/4 "2020-02-09T21:12:36Z")

</div>

Hi,

I solved this as I was opening the “package.swift” file in Xcode. I ran the following command in “terminal” and then opened the generated Xcode project and everything worked fine.

swift package generate-xcodeproj

Regards

Adrian

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 31, 2020, 1:45am UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519/5 "2020-03-31T01:45:18Z")

</div>

@denisthemenace Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 31, 2020, 1:45am UTC](https://forums.kodeco.com/t/cant-run-the-kitura-chapter-2-app-within-xcode/93519/6 "2020-03-31T01:45:57Z")

</div>

@adrianbooth67 Thank you for sharing your solution - much appreciated!
