自己配置真机调试证书的时候遇到如下问题。
在运行后报告从未遇见的各种错误,如:
dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/HMWeibo06
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/Frameworks/Alamofire.framework/Alamofire: mmap() error 1 at address=0x10020C, size=0x48 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/Frameworks/Alamofire.framework/Alamofire
/private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/Frameworks/Alamofire.framework/Alamofire: mmap() error 1 at address=0x1002F4, size=0x48 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/Frameworks/Alamofire.framework/Alamofire
/private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/Frameworks/Alamofire.framework/Alamofire: mmap() error 1 at address=0x1003E0, size=0x48 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/91F9AFEB-5DC2-473D-BACD-BE003493633E/HMWeibo06.app/Frameworks/Alamofire.framework/Alamofire
(lldb)
反复调整项目配置信息无果。但是,在检查证书状态的时候发现真机调试证书被系统标示为:此证书是由未知授权机构签名的。
经检索互联网发现,原来是WWDR Intermediate Certificate没有导入,从苹果官网下载并导入后即可正常调试。
请下载最新的WWDR证书, 并进行安装.
此时,原调试证书的状态也将变为:此证书有效。
至此,问题解决。
网友评论