could not build module 'UIKit'

今天用Xcode8.1编译项目时,模拟器运行项目遇到一个莫名其妙的问题:could not build module 'UIKit',但是真机上缺没有这个问题,网上搜索说删除moduleCache就可以了,但是我删除了并clear了还是没有用。
后来找了很久发现模拟器上运行其他简单的demo也会出现这个错误,就怀疑是不是自己不小心修改到UIKit的源码,最后找同事拷贝了一份UIKit.framework覆盖过去就解决了。

UIKit.framework路径:
/Users/YourUserName/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks

    原文作者:湿子
    原文地址: https://www.jianshu.com/p/f0e7d1c9054d
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞