Could not build module UIKit

前端 未结 24 1204
予麋鹿
予麋鹿 2020-12-17 07:59

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:

相关标签:
24条回答
  • 2020-12-17 08:25

    Check whether the appropriate target is selected or not from the "active scheme selector". Selecting "Generic iOS Device" solved my problem.

    Click to select simulator

    Select "Generic iOS Device":

    0 讨论(0)
  • 2020-12-17 08:25

    Suppose you have changed or deleted anything in the UIKit framework, then shows this error.

    If you are able to find that class or .h file to be changed or deleted, then replace that whole file content in that .h file from other system's Xcode (confirm that should be similar Xcode version).

    For example, In UIView.h file - I have deleted a method and closed and opened the Xcode. Then I couldn't reverted that code.

    0 讨论(0)
  • 2020-12-17 08:26

    I tried with delete derived data,delete application from project list but when i delete xcode and install new one its working so its best way just delete xcode and install new xcode.

    0 讨论(0)
  • 2020-12-17 08:28

    I had this issue, and I set Device on Generic iOS Device, clean project, make build. Then I switched device to my real device and run project. The error does not appear.

    0 讨论(0)
  • 2020-12-17 08:29

    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!

    0 讨论(0)
  • 2020-12-17 08:29

    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.

    0 讨论(0)
提交回复
热议问题