问题
So i was coding on my app the last few hours and on some point I decided to launch my app on my iPhone 8 (13.3.1) instead of using the simulator (13.3) and it crashed instantly with the following error:
dyld: warning: could not load inserted library '@executable_path/Frameworks/libclang_rt.asan_ios_dynamic.dylib' into hardened process because no suitable image found. Did find:
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: code signature invalid for '/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib'
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: code signature invalid for '/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib'
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/libclang_rt.asan_ios_dynamic.dylib: stat() failed with errno=1
dyld: Library not loaded: @rpath/FBLPromises.framework/FBLPromises
Referenced from: /private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/SmartBuy
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises'
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises'
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises'
/private/var/containers/Bundle/Application/F8559B38-6434-4B39-BA14-DF1FF9689517/SmartBuy.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
I tested the same app on my iPhone 5S (12.3.1) and it launched without any errors even tho I had a black-screen (My App is iOS 13 based) some research suggested that it is because of certificates errors, but i cant seem to get around it. So here i am.
What I already tried:
Restart XCode, iPhone and MacBook
New Project with same code files
Deleted Apple Worldwide Developer Relations Certification Authority
New developer certificates
Delete folders like Cache and DerivedData
codesign in Terminal
reinstalled all Pods
回答1:
The error seems to be everywhere since 13.3.1 update.
I found some thread saying that it's got fixed by commenting use_frameworks!
https://forums.developer.apple.com/thread/128435 https://github.com/Alamofire/Alamofire/issues/3051#issuecomment-580003683
来源:https://stackoverflow.com/questions/59994746/dyld-could-not-load-inserted-library-but-works-on-simulator-and-another-iphone