I am trying to use the external environment with my Swift application for Mac OS X. The external environment also uses Swift, and therefore depends on shared Swift libraries (for example, libswiftCore.dylib). This is confirmed by the team.
$ otool -L PromiseKit.framework/PromiseKit
PromiseKit.framework/PromiseKit:
...
@rpath/libswiftCore.dylib (compatibility version 0.0.0, current version 0.0.0)
Search @rpathI see
$ otool -l PromiseKit.framework/PromiseKit
...
cmd LC_RPATH
cmdsize 40
path @executable_path/Frameworks (offset 12)
So, at runtime, I expect it @rpathto resolve@executable_path/Frameworks
Problem
I get a runtime error
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: .../PromiseKit.framework/Versions/A/PromiseKit
Reason: image not found
In the folder containing my embedded executable, I do not see the folder Frameworks.
Unsuccessful attempts to fix it
I tried installing EMBEDDED_CONTENT_CONTAINS_SWIFTon YESfor my application, but this does not create a folder yet Frameworks.
Frameworks Swift ( /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx). ββ , , :
objc[64445]: Class _TtC10Foundation15NSSimpleCString is implemented in both
.../Frameworks/libswiftFoundation.dylib and
.../myApp.
One of the two will be used. Which one is undefined.
, Swift ? , , XCode Frameworks?
, , . , Frameworks .app Swift