Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10 Error: Multiple commands produce for 'app' and 'appex'

Tags:

ios

xcode10

I got the recently discussed "Xcode 10 Error: Multiple commands produce..." error, but for the resulting app and appex file of my project. Does anyone have an idea what this means. My project has one app and two extensions (only one is part of the error).

Showing Recent Messages

Prepare build
note: Using new build systemnote: Planning buildnote: Constructing build description

Build system information
error: Multiple commands produce '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev.app':
1) Target 'MyApp Dev' has create directory command with output '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev.app'
2) That command depends on command in Target 'MyApp Dev': script phase “[CP] Copy Pods Resources”

Build system information
error: Multiple commands produce '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev Share Extension.appex':
1) Target 'MyApp Dev Share Extension' has create directory command with output '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev Share Extension.appex'
2) That command depends on command in Target 'MyApp Dev Share Extension': script phase “[CP] Copy Pods Resources”

Build system information
warning: ignoring duplicated output file: '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev.app' (in target 'MyApp Dev')
Build system information
warning: ignoring duplicated output file: '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev Share Extension.appex' (in target 'MyApp Dev Share Extension')

Build failed    18.09.18, 10:28    4.5 seconds

I know I can go back to the legacy build system, but I would prefer using the new and faster build system. Thank you for any help.

like image 219
Norbert Avatar asked Sep 18 '18 08:09

Norbert


4 Answers

In case someone is still struggling with this after updating cocoapods and reinstalling pods:

  1. Open Build Phases of the target which gives you problems
  2. Open Copy Pods Resources phase.
  3. Make sure the Output Files is empty. In my case I had a strange entry ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}. I removed it and the build was successful
like image 196
zasia Avatar answered Oct 22 '22 09:10

zasia


Solved my problem by updating Cocoapods from 1.4.0 to 1.5.3

like image 21
Norbert Avatar answered Oct 22 '22 09:10

Norbert


I was able to fix it by opening the Runner workspace project in Xcode 10. Then navigate to File, Workspace Settings and change the build system to Legacy Build System.

image shows where it's changed

like image 28
user3877214 Avatar answered Oct 22 '22 09:10

user3877214


My Cocoapod version was already 1.5.3(latest). Just running "pod install" (or "pod install --no-repo-update" if you don't want to update existing pods) solved it for me.

like image 13
hardik parmar Avatar answered Oct 22 '22 09:10

hardik parmar