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.
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.
If cleaning the project and deleting the 'derived data' doesn't work, try to change the 'Deployment target' (at 'General' tab) from 7.0 to 7.1 Hope that this will help.
Make sure none of the files are edited in the
UIKit
framework located inside Xcode.If your project builds for another target (e.g. it builds for simulator and NOT your device), then it's confirmed you accidentally edited one of the header files of the frameworks for that target. The affected framework is the one you are receiving compiling errors for.
Check whether the appropriate target is selected or not from
active scheme selector
. SelectingGeneric iOS Device
solved my problem.Click to select simulator
Select
Generic iOS Device
If you have two Xcode then uninstall both and again install Xcode.it works for me.
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.