Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build error Xcode 10 - Multiple commands produce

Tags:

xcode

ios

swift

I just upgraded to Xcode 10, and I suddenly face this error when I try to build, any ideas how to fix it? I tried cleaning derived data, but without any luck.

enter image description here

like image 597
Recusiwe Avatar asked Sep 19 '18 01:09

Recusiwe


3 Answers

If you use CocoaPods, click Xcode menu file -> Workspace Settings , And click Build system choice Legacy Build System

https://i.stack.imgur.com/FqiID.png

If you not use CocoaPods, same of top , select Project Settings

like image 66
leaveslife Avatar answered Sep 23 '22 18:09

leaveslife


If your app is generating the error related to the multiple .app files just like mentioned above in question then removing the .plist files from "Copy bundle Resources" WILL NOT WORK.

If the error is related to .app file then follow the following steps.

  1. Select the Target.

  2. Go to Build Phases tab.

  3. Remove the items listed in Output Files
  4. Compile the code if it compiles successfully then not follow the next steps.
  5. If code does not compile successfully and Xcode may give you an error related to "Library not found". Then add the missing library in General Tab in Linked Frameworks and Libraries that Xcode mentioned in the error.
  6. Keep adding these libraries (that Xcode ask through compile errors) in Linked Frameworks and Libraries until the code compiles successfully.

    Hope this helps.

like image 26
Abuzar Amin Avatar answered Sep 22 '22 18:09

Abuzar Amin


You can try to change the build system to Legacy, File > Workspace Settings > Build System > Legacy Build System.

like image 4
Vadym Piatkovskyi Avatar answered Sep 20 '22 18:09

Vadym Piatkovskyi