install_name_tool
でUIKit
のパスを変えたら、@rpath/libswiftCore.dylib
をロードできないと言われた。 $ install_name_tool -change /System/Library/Frameworks/UIKit.framework/UIKit $(xcrun --show-sdk-platform-path --sdk iphoneos)/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot//System/Library/Frameworks/UIKit.framework/UIKit main $ ./main dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /Users/norio/github/docker-swift/./main Reason: image not found [1] 95202 abort ./main
(edited)rpath
を設定したらUIKit
にリンクされてるDocumentManager
をロードできないと言われ、ここで「実行時の環境を変えないとダメだ。」となりinstall_name_tool
を使う方法は終了。 $ pbpaste|swiftc -sdk $(xcrun --show-sdk-path --sdk iphonesimulator) -target x86_64-apple-ios12.2-simulator - -Xlinker -rpath -Xlinker $(xcrun --show-sdk-platform-path --sdk iphoneos)/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift $ install_name_tool -change /System/Library/Frameworks/UIKit.framework/UIKit $(xcrun --show-sdk-platform-path --sdk iphoneos)/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot//System/Library/Frameworks/UIKit.framework/UIKit main $ ./main dyld: Library not loaded: /System/Library/PrivateFrameworks/DocumentManager.framework/DocumentManager Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot//System/Library/Frameworks/UIKit.framework/UIKit Reason: image not found [1] 95440 abort ./main