Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not build module UIKit

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.

like image 838
Hardik Shah Avatar asked Nov 23 '13 14:11

Hardik Shah


2 Answers

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

like image 120
chinnawatp Avatar answered Sep 17 '22 15:09

chinnawatp


A full clean + deleting the derived data worked for me.

Be sure to fix any code that may be broken because UIKit cannot be installed, before the clean and build.

So, for example, if you are trying to reference UICollectionViewController, and need UIKit to reference it, comment out the code that is using UICollectionViewController, comment out the import for UIKit.

Then clean, build. Now uncomment import UIKIt, build. NOW uncomment UICollectionViewController code, build again.

like image 43
Raphael Oliveira Avatar answered Sep 18 '22 15:09

Raphael Oliveira