Xcode 9.3 (9E145) dyld: Library not loaded: @rpath/libswiftCore.dylib

Hi,

I'm using embedded frameworks in my project.

Structure is below.

MainApp <--- MyFramework <--- ExternalFramework

Project is working on Xcode 9.2

Xcode 9.3 is building and installing App correctly but on start I gon next message


dyld: Library not loaded: @rpath/libswiftCore.dylib

Referenced from: /private/var/containers/Bundle/Application/HASH/MyApp.app/Frameworks/ExternalFramework.framework/ExternalFramework

Reason: image not found


I checked MyApp.app file and ExternalFramework.framework is in.


Are there new settings for embedded frameworks in Xcode 9.3?

Thank you.

Replies

Same Problem here, have you fixed that?

Hi, i am also running into this problem. I've tried a lot of things suggested on sites like SO, private blogs, ... but without luck. Hope you have found a solution and can share it here. Thx!

Hi all,


i looked into the Frameworks folder within my App and the _libswiftCore.dylib_ is not there. When i look into the Frameworks Folder within my App after archiving and exporting the App with Xcode 9.2 not only the _libswiftCore.dylib_ is there but many other Swift libs either. So this seems to bee the problem but i do not know why this is happening or how to solve it.


Hope anybody can help ...


Regards,

Sebastian

I had the same problem:

dyld: Library not loaded: @rpath/libclang_rt.asan_ios_dynamic.dylib

Referenced from: /private/var/containers/Bundle/Application/.../Frameworks/....framework/...

Reason: image not found

This is my own app with my own (build for debug) framework.

What solved it for me is to make sure the Diagnostics ticked in the Run scheme are the same for the app and for the framework.

This was not needed with Xcode 9.2...

Has anyone solved this yet. I'm having the same problem with xCode 9.3. 9.2 worked fine.

Been stuck on this one myself for a while. Hope there's a solution. For now I have to clean the build folder periodicly which is frustrating.

This helped me in Xcode 9.3:

- Go to Build Phases of your target

- Add New run script phase (name it whatever you want)

- Leave the Shell as-is (/bin/sh)

- In code part add the following:

pushd ${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/<YourFrameworkName>.framework/Frameworks
for EACH in *.framework; do
echo "-- signing ${EACH}"
/usr/bin/codesign --force --deep --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --entitlements "${TARGET_TEMP_DIR}/${PRODUCT_NAME}.app.xcent" --timestamp=none $EACH
done
popd

Just replace <YourFrameworkName> with an appropriate name (the name of your framework. So, if your framework is "MyFramework.framework", this line should look like:

pushd ${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/MyFramework.framework/Frameworks


- Clean, build, run


Hope this will help to you too!


Solution found at:

https://keystrokecountdown.com/articles/signing/index.html

I have resolved this issue with Xcode 9.3 & iOS 11.0.1 , Please check my answer here : https://stackoverflow.com/questions/26104975/dyld-library-not-loaded-rpath-libswiftcore-dylib-image-not-found/51649534#51649534