Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple errors after migrating to Xcode 10

Tags:

xcode

ios

xcode10

After updating to Xcode 10, I am getting the following errors in my project :

First error :

:-1: Multiple commands produce '/Users/maropost/Library/Developer/Xcode/DerivedData/XYZ-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/XYZ.framework/Info.plist':

  1. Target 'XYZ' (project 'MPPush') has copy command from '/Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/XYZ/XYZ/Info.plist' to '/Users/maropost/Library/Developer/Xcode/DerivedData/XYZ-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/XYZ.framework/Info.plist'
  2. Target 'XYZ' (project 'XYZ') has process command with output '/Users/maropost/Library/Developer/Xcode/DerivedData/XYZ-dorcxsyibrmjnndrycgblntogjan/Build/Products/Debug-iphoneos/XYZ.framework/Info.plist'

Second error :

Could not delete /Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/XYZ/build because it was not created by the build system and it is not a subfolder of derived data.

Third error :

Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure

Already checked this but unrelated.

like image 667
Nitish Avatar asked Sep 03 '26 04:09

Nitish


2 Answers

For the below error:

Could not delete /Users/maropost/Documents/Work/iOS/Products/SDK/SwiftFromStart/MPPush/build because it was not created by the build system and it is not a subfolder of derived data.

According to https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10

The Workaround is to Delete the build folder manually which is in your framework's project directory. Hope this helps!

like image 141
explorer Avatar answered Sep 04 '26 18:09

explorer


I have fixed issues by enabling Legacy mode. Do follow the below steps it will help you.

In Xcode, Goto File -> Project/Workspace settings > Advanced -> Select Legacy

Please refer below screenshots for further assistance.

Step 1

Step 2

Step 2

IMPORTANT NOTE:

CLEAN + BUILD & MAKE SURE YOUR DELETED DERIVEDATA FOLDER FROM TRASH

Check your Copy Bundle Resources in Build Phase, You should find some files(should be images in your situation) in that list twice. Delete them and rebuild them.

like image 38
Hitesh Surani Avatar answered Sep 04 '26 17:09

Hitesh Surani