dyld: could not load inserted library, but works on Simulator and another iPhone

心不动则不痛 提交于 2020-08-20 11:08:34

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!