# OS X command line project can't find RxAtomic framework

**URL:** <https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419>\
**Category:** RxSwift\
**Created:** [February 17, 2019, 12:27pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419 "2019-02-17T12:27:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [February 17, 2019, 12:27pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/1 "2019-02-17T12:27:17Z")

</div>

I’m attempting to compile an OSX command line project with RxSwift. The project has nothing in it, except what is auto-generated by xcode. The RxAtomic framework can not be found at run time.

dyld: Library not loaded: @rpath/libswiftAppKit.dylib  
Referenced from: /Users/user1/Library/Developer/Xcode/DerivedData/CommandLine\_Project-bwkerycnadvzcsaxraloxwknylzq/Build/Products/Debug/RxSwift.framework/Versions/A/RxSwift  
Reason: image not found

What is the correct way to configure this type of project? My Podfile is simple:

use\_frameworks!

target ‘CommandLine\_Project’ do  
pod ‘RxSwift’, ‘4.4.0’  
end

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [February 17, 2019, 7:27pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/2 "2019-02-17T19:27:26Z")

</div>

Try with 4.4.1, I heard there was some issue with the versioning of the libs in the previous release

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [February 17, 2019, 9:10pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/3 "2019-02-17T21:10:26Z")

</div>

Changed to 4.4.1, same problem

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [February 22, 2019, 9:46am UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/4 "2019-02-22T09:46:57Z")

</div>

I am not sure what the prolem might be but have a look at the chapter on Schedulers - I remember the example project in that chapter is a command line tool so you might want to look into its setup to see if there is anything special to make it work.

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [February 22, 2019, 12:20pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/5 "2019-02-22T12:20:15Z")

</div>

I took the Podfile from the schedulers chapter and I only changed the target name to my project and otherwise left the Podfile identical. Then with nothing in my command line tool project but the default code, I ran the project and got the same error. This is why I am asking how to configure this type of project. The scheduler project works and mine does not. What am I missing?

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [February 22, 2019, 1:14pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/6 "2019-02-22T13:14:47Z")

</div>

This is a copy of the Scheduler chapter Podfile:

use\_frameworks!

target ‘Schedulers’ do  
pod ‘RxSwift’, ‘4.0.0’  
end

post\_install do |installer|  
installer.pods\_project.targets.each do |target|  
target.build\_configurations.each do |config|  
config.build\_settings[‘CONFIGURATION\_BUILD\_DIR’] = ‘$PODS\_CONFIGURATION\_BUILD\_DIR’  
end  
end  
end

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [February 22, 2019, 1:36pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/7 "2019-02-22T13:36:36Z")

</div>

I found the problem. This is the sort of thing that makes me hate writing software!

Under project “build settings”, “Other Linker Flags”, add:

-rpath  
$DT\_TOOLCHAIN\_DIR/usr/lib/swift/macosx/

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [February 22, 2019, 3:08pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/8 "2019-02-22T15:08:27Z")

</div>

The next question is, what does this code from the Podfile actually do to the project, because it is necessary to make the project run:

post\_install do |installer|  
installer.pods\_project.targets.each do |target|  
target.build\_configurations.each do |config|  
config.build\_settings[‘CONFIGURATION\_BUILD\_DIR’] = ‘$PODS\_CONFIGURATION\_BUILD\_DIR’  
end  
end  
end

ANSWER:

This code changes the value at:  
Pods → Targets → RxAtomic(and RxSwift) → Build Settings → Per-configuration Build Products Path → Debug(and Release)

to  
${PODS\_CONFIGURATION\_BUILD\_DIR}

That’s it. It’s all “build settings” issues in various targets through the workspace.

---

<div class="post-metadata">

**Author:** ![evs718](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/evs718/32/81494_2.png) [@evs718](https://forums.kodeco.com/u/evs718)\
**Post date:** [March 5, 2019, 2:08pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/9 "2019-03-05T14:08:48Z")

</div>

Update for March 5, 2019

The situation has changed.

- Same Xcode version 10B61
- Create a command line tool project in Xcode. I named mine “CLT”
- Create and install this Podfile:  
target ‘CLT’ do  
use\_frameworks!  
pod ‘RxSwift’  
end
- import RxSwift in main.swift
- run
- crash:  
**dyld: Library not loaded: @rpath/RxAtomic.framework/Versions/A/RxAtomic**  
**Referenced from: /Users/userXYZ/Library/Developer/Xcode/DerivedData/CLT-fcpegvkpwcnbgkahumvrvwssxqnk/Build/Products/Debug/CLT**  
**Reason: image not found**
- work around:  
**in project CLT → Targets → CLT → Build Settings → Runpath Search Paths**  
add two entries:  
‘@executable\_path/RxAtomic’  
‘@executable\_path/RxSwift’  
**in Pods → Targets → RxSwift → Build Settings → Always Embed Swift Standard Libraries → YES**

Now CLT will run.

---

<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:** [April 1, 2019, 9:50pm UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/10 "2019-04-01T21:50:48Z")

</div>

@evs718 Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [August 3, 2019, 4:28am UTC](https://forums.kodeco.com/t/os-x-command-line-project-cant-find-rxatomic-framework/62419/11 "2019-08-03T04:28:08Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
