1

My project can normally work in the past, but now it suddenly crashes when runs for a while. Error message:

dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
  Referenced from: /Users/qizijia/Library/Developer/CoreSimulator/Devices/7CDDEA9B-0ADD-4A64-8084-BCFBBDF40483/data/Containers/Bundle/Application/FE1EC391-A6B7-44F7-AEDE-DB643B125DBB/ppp.app/Frameworks/CircleMenu.framework/CircleMenu
  Reason: no suitable image found.  Did find:
    /usr/lib/swift/libswiftSwiftOnoneSupport.dylib: mach-o, but not built for iOS simulator
    /usr/lib/swift/libswiftSwiftOnoneSupport.dylib: mach-o, but not built for iOS simulator

I have tried to follow the answers according to dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib,but it didn't help.

qizijia
  • 11
  • 6
  • Try this: Delete `Derived Data`. Kill the simulator. Restart XCode 10 (?) and clean the project. Maybe try on a hardware device. – kuzdu Oct 08 '19 at 15:36
  • https://blog.krzyzanowskim.com/2018/12/05/rpath-what/ See if this article helps – AjinkyaSharma Oct 08 '19 at 15:45

1 Answers1

0
  1. Go to "libswiftSwiftOnoneSupport" Framework Target's build Phases
  2. Click on + button on upper right corner and select " New Run Script Phase"
  3. Add the Following Script and then run the project.
cd $BUILT_PRODUCTS_DIR
mkdir $PROJECT_NAME.framework/Frameworks &>/dev/null
for framework in *.framework; do
if [ $framework != $PROJECT_NAME.framework ]; then
cp -r $framework $PROJECT_NAME.framework/Frameworks/ &>/dev/null
fi
done