原文解决办法在这里:真机调试APP时报dyld: Library not loaded: @rpath/XXX等错误**
谢谢博主黑暗中的孤影
我在下载证书之后,在keyChain里面把证书设置为始终信任,如图:
Paste_Image.png提示:此证书的签发者无效
因此,我修改证书为始终信任:
Paste_Image.png
结果在运行的时候,编译通过, 但程序在启动的时候,程序直接崩溃,显示如下:
dyld: Library not loaded: @rpath/AFNetworking.framework/AFNetworking
Referenced from: /var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/text1
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/Frameworks/AFNetworking.framework/AFNetworking: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/Frameworks/AFNetworking.framework/AFNetworking'
/private/var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/Frameworks/AFNetworking.framework/AFNetworking: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/Frameworks/AFNetworking.framework/AFNetworking'
/private/var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/Frameworks/AFNetworking.framework/AFNetworking: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/BD8D7CF1-5E24-4B92-A300-70E28C82C1BA/text1.app/Frameworks/AFNetworking.framework/AFNetworking'
(lldb)
这个是我的截图:
Paste_Image.png
最后我把证书改成系统默认就可以了...
Paste_Image.png再次编译运行, success
网友评论