Could not build module UIKit

2019-01-25 04:20发布

Suddenly it stops building application in device. In simulator its working but when I connect the device and try to run it in device it gives me an error:

Could not build module UIKit

I tries a lot but couldn't solve it.

19条回答
淡お忘
2楼-- · 2019-01-25 05:05

I am also facing this issue for very long time and after trying all the suggestions given in the different portals, i came to know that the issue is with the device you want to run the application. Device have latest iOS and your Xcode is not supporting that iOS.

For example you have Xcode 7.2 and want to run the application on device which have iOS 9.2.1. So you only need to update your Xcode.

And one more thing Base Sdk in Build Settings is always greater or equal to the software version number on your development device.

查看更多
做自己的国王
3楼-- · 2019-01-25 05:05

This error happened to me when I accidentally modified the uikit framework. Removing and re-adding the uikit framework in link binary with library, cleaning derived data and restarting xcode didn't work. I don't want to uninstall my xcode so I tried to copy codes of the class that I might have modified from other pc with xcode that works fine and paste it to mine. It worked!

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-01-25 05:06

Already tried all the solutions above. I still could not solve my problem. So I uninstall the Xcode and reinstall it. It worked magically.hope this helps.

查看更多
家丑人穷心不美
5楼-- · 2019-01-25 05:07

Check the tool chains installed and select the right xcode tool chain. In my case i changed it from Swift 4.0 to xcode 9.2 and it worked.

查看更多
神经病院院长
6楼-- · 2019-01-25 05:09

Please don't make the same mistake like I did. In my case, I accidentally typed some words into Foundation framework file.

查看更多
做个烂人
7楼-- · 2019-01-25 05:11

Cleaning Derived data worked for me

查看更多
登录 后发表回答