Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not loaded: @rpath/libswiftAppKit.dylib #47

Closed
camdeardorff opened this issue Dec 23, 2015 · 2 comments
Closed

Library not loaded: @rpath/libswiftAppKit.dylib #47

camdeardorff opened this issue Dec 23, 2015 · 2 comments

Comments

@camdeardorff
Copy link

Setup:
Using the Xcode template I created a new Perfect Server Project, modified the scheme to include the executable PerfectServer HTTP.app, added PerfectLib.Framework to the linked libraries and binaries. The project runs and PerfectServerModuleInit() executes in the project.

Problem:
I was never able to get a request to the mustache template in my project, I was still able to send requests to TapTracker, Authenticator, and UploadEnumerator (login, request, TapTracker...). I went to the webroot directory and saw login, request, TapTracker... but not my mustache template. Looking deeper I ran the executable PerfectServer HTTP and the following message comes out after multitude of other messages come out

Output:
objc[4290]: Class _TtCSs18_EmptyArrayStorage is implemented in both /Users/Cam/Library/Developer/Xcode/DerivedData/Examples-aqjpcyrjmijblwavckfeldxenqlq/Build/Products/Debug/PerfectLib.framework/Versions/A/Frameworks/libswiftCore.dylib and /Users/Cam/Library/Developer/Xcode/DerivedData/Examples-aqjpcyrjmijblwavckfeldxenqlq/Build/Products/Debug/perfectserverhttp. One of the two will be used. Which one is undefined.

Errno dlopen(./PerfectLibraries/MyTestPerfectServer.framework/Versions/Current/MyTestPerfectServer, 6): Library not loaded: @rpath/libswiftAppKit.dylib
Referenced from: /Users/Cam/Library/Developer/Xcode/DerivedData/Examples-aqjpcyrjmijblwavckfeldxenqlq/Build/Products/Debug/MyTestPerfectServer.framework/Versions/Current/MyTestPerfectServer
Reason: image not found
FAILED to load MyTestPerfectServer.framework/

@camdeardorff
Copy link
Author

I found a fix for the 'Library not loaded: @rpath/libswiftAppKit.dylib' issue, It is certainly not ideal but it was the only thing that worked after hours of searching.
I first had to add libswiftAppKit.dylib to the linked frameworks and libraries found somewhere along the lines of yourHHD/Applications/Xcode.App/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/libswiftAppKit.dylib
Then change the build settings "Embedded Content Contains Swift Code" to Yes
Finally import AppKit following the PerfectLib import.

This seems to silence the error but Im still not seeing my mustache file loaded up into the webroot after I fire everything up. This may be an issue with the Xcode template configuration or maybe I'm missing something.

@chh51
Copy link

chh51 commented Apr 23, 2016

I had the same error regarding 'Library not loaded: @rpath/libswiftAppKit.dylib' and found that just changing the build setting "Embedded Content Contains Swift Code" to Yes fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants