最近遇到多次类似的库加载失败的问题,现象是从GitHub上下载的Demo,模拟器可以运行,真机上一运行就crash,并报错以下类似信息:
dyld: Library not loaded: @rpath/ImSDK.framework/ImSDK
Referenced from: /private/var/containers/Bundle/Application/234A068D-E726-440A-9BD2-BAF8E96221BE/TXLiteAVDemo_Professional.app/TXLiteAVDemo_Professional
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/234A068D-E726-440A-9BD2-BAF8E96221BE/TXLiteAVDemo_Professional.app/Frameworks/ImSDK.framework/ImSDK: code signature invalid for '/private/var/containers/Bundle/Application/234A068D-E726-440A-9BD2-BAF8E96221BE/TXLiteAVDemo_Professional.app/Frameworks/ImSDK.framework/ImSDK'
/private/var/containers/Bundle/Application/234A068D-E726-440A-9BD2-BAF8E96221BE/TXLiteAVDemo_Professional.app/Frameworks/ImSDK.framework/ImSDK: stat() failed with errno=25
如果有人像我一样,在网上查到一些方法,类似与手动添加
Copy Files
失败后,可以检查一下真机运行选择的开发者账号是不是付费的,记得要换成付费
的开发者账号再运行!!!!!