Xcode崩溃dyldbootstrap::start,dyld: Library not loaded: @rpath

错误如下:

dyld: Library not loaded: @rpath/AudioStreamer.framework/AudioStreamer
Referenced from: /private/var/containers/Bundle/Application/5F2D00F3-37B3-4DFD-8CA2-8E04B9AF99B0/MorningDiaryC.app/MorningDiaryC
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/5F2D00F3-37B3-4DFD-8CA2-8E04B9AF99B0/MorningDiaryC.app/AudioStreamer.framework/AudioStreamer: code signature in (/private/var/containers/Bundle/Application/5F2D00F3-37B3-4DFD-8CA2-8E04B9AF99B0/MorningDiaryC.app/AudioStreamer.framework/AudioStreamer) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

error

解决办法:

首先
Xcode -> Target -> Build Setting -> Other Linker Flags 添加-ld_classic

其次,最重要的
Xcode -> Target -> Build Phases -> Embed Frameworks 去掉勾选copy only when installing
check

参考文章:
https://www.jianshu.com/p/62c7cfb3e156

微信打赏

意外收获认可,内心充满感激;打赏之举,更添无限动力。