ios - 即使我做了深度清理并重新安装 Xcode,也无法在设备上运行 Xcode 项目,钥匙串总是出错
问题描述
一切都运行良好,在模拟器和我的三台测试设备(iPhone 8、iPhone 8 plus 和当前的 iPhone 11 (iOS 11.3.1))上运行多个项目,直到刚刚开始出现这个错误,当我正在尝试在设备上运行项目。在模拟器上,它仍然运行良好。
经历了许多建议的步骤,StackOverflow 的答案,甚至我清理了与 XCode 相关的所有内容(当时我已经在 11.4 上更新了 XCode):删除~/Library/Developer/,~/Library/Caches/com.apple.dt .Xcodeand ; 重新安装它,现在它仍然无法正常工作。
这变得非常令人沮丧,我非常感谢已经遇到这个问题的人的帮助,我希望已经解决了这个问题。
dyld: Library not loaded: @rpath/KeychainAccess.framework/KeychainAccess
Referenced from: /private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/MyiOS
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess: code signature invalid for '/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess'
/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess: stat() failed with errno=25
/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess: code signature invalid for '/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess'
/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess: stat() failed with errno=1
/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess: code signature invalid for '/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess'
/private/var/containers/Bundle/Application/E94B4D8B-47A3-49BC-A6D7-22A5C1914A23/MyiOS.app/Frameworks/KeychainAccess.framework/KeychainAccess: stat() failed with errno=1
解决方案
伙计们,回答你自己的问题很奇怪,但如果有人遇到这个问题,这对我有用,因为乍一看,这是一个没有希望的例子。
这适用于所有将在某个时刻使用 iOS 11.3.1 的人 - 很有机会获得这个。
不管你信不信,你所要做的就是评论你的 Podfile 行 use_frameworks!它有效。
参考并感谢这篇文章: https ://github.com/Alamofire/Alamofire/issues/3051#issuecomment-580003683
推荐阅读
- python - 将值循环附加到列表中,导致 ValueError:要解包的值太多
- html - 响应式导航栏响应问题
- coldfusion - Coldfusion 如何将 PDF 响应流保存到文件
- mongodb - 在单独的集合中查找具有匹配 UUID 的 mongodb 文档
- list - 如何从云“控制台”上的 db2 中查看 Db2 恢复和管理事件历史记录
- go - dovecot:lmtp:错误:致命错误:未能保留页面摘要内存
- python - 如何使用 pydrive 共享文件
- python - 添加阻止用户使用命令的冷却时间
- apache-spark - 查询Spark同时加载的hive表时如何避免错误
- swift - 使用 Swift 创建简单字典时出错