Parse-SDK-iOS-OSX icon indicating copy to clipboard operation
Parse-SDK-iOS-OSX copied to clipboard

Multiple commands produce Parse.bundle

Open Kiplol opened this issue 4 years ago • 21 comments

Xcode 11.4 Default build system

When trying to archive app using Parse and Parse/FacebookUtils integrated via Cocoapods, I get this build error.

Multiple commands produce '<removed>/UninstalledProducts/iphoneos/Parse.bundle':
1) Target 'Parse-Parse' has create directory command with output '<removed>/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.bundle'
2) Target 'Parse.default-FacebookUtils-Parse' has create directory command with output '<removed>/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.bundle'

Parse and Parse/FacebookUtils are version 1.18.0.

Kiplol avatar Apr 21 '20 20:04 Kiplol

Interesting. I'll take a look.

noobs2ninjas avatar May 07 '20 22:05 noobs2ninjas

I've been able to work around this by following these steps while arciving.

  1. Rename the product name from Parse to anything else in Pods project Parse.default-FacebookUtils-Parse target
  2. Change Parse.bundle to that new name in AppName project's AppName target's [CP] Copy Pods Resources Input Files
  3. Delete ALL Output files right below
  4. Change "Parse.bundle" in Pods/Target Support Files/Pods-AppName/Pods-AppName-resources.sh to the new name.

Kiplol avatar May 22 '20 17:05 Kiplol

With Xcode 12 beta I am getting "multiple commands produce" errors for bolts and FacebookUtils. Screen Shot 2020-07-31 at 12 08 25 AM

bcbeta avatar Jul 31 '20 06:07 bcbeta

@Kiplol could you explain how you fixed this error? I get warnings in the simulator but error when trying to archive. Any help would be appreciated. thanks!

bcbeta avatar Aug 01 '20 04:08 bcbeta

Removing use_frameworks! from the Podfile and then changing the product name as you suggested allowed me to build.

bcbeta avatar Aug 04 '20 23:08 bcbeta

Can you confirm whether you still need to take these steps using the current code on master?

drdaz avatar Aug 06 '20 14:08 drdaz

Yes, this was happening with the master as of two days ago.

bcbeta avatar Aug 07 '20 04:08 bcbeta

@bcbeta I merged a couple of PRs to master yesterday. I did some work with build ambiguities in there, so I'd be interested to hear if it's still the case 🙂

drdaz avatar Aug 07 '20 08:08 drdaz

I see this error only during Archiving. Is anyone also facing this issue?

Error while Archiving

Multiple commands produce '/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gzgwdoovsnudgranphnqjcrcijbi/Build/Intermediates.noindex/ArchiveIntermediates/My App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.framework':
1) Target 'Parse' has create directory command with output '/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gzgwdoovsnudgranphnqjcrcijbi/Build/Intermediates.noindex/ArchiveIntermediates/My App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.framework'
2) Target 'Parse.default-UI' has create directory command with output '/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gzgwdoovsnudgranphnqjcrcijbi/Build/Intermediates.noindex/ArchiveIntermediates/My App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.framework'

Warning

I see this compiler warning.

Multiple targets match implicit dependency for linker flags '-framework Parse'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'My App' from project 'MyApp')

And many warning under Parse.default-UI

duplicate output file '/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gzgwdoovsnudgranphnqjcrcijbi/Build/Intermediates.noindex/ArchiveIntermediates/My App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.framework/PrivateHeaders/PFDefaultACLController.h' on task: CpHeader /Users/me/Documents/Xcode/MyApp_Xcode/Pods/Parse/Parse/Parse/Internal/ACL/DefaultACLController/PFDefaultACLController.h /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gzgwdoovsnudgranphnqjcrcijbi/Build/Intermediates.noindex/ArchiveIntermediates/My App/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.framework/PrivateHeaders/PFDefaultACLController.h

Environment and settings

Using using Xcode 11.5 and cocoapod version 1.9.1. Podfile as follows

platform :ios, '9.0'
use_frameworks!

target 'My App' do
  pod 'Parse', '1.18.0'
  pod 'Parse/UI', '1.18.0'
end

target 'My App Test' do
  pod 'Parse', '1.18.0'
end

Workaround

The archiving error is gone when I remove the target 'My App Test'. I think the inclusion of pod 'Parse', '1.18.0' into 2 target cause this issue.

nebitrams avatar Aug 09 '20 15:08 nebitrams

I am still getting the multiple commands error with the most recent master.

Screen Shot 2020-08-14 at 9 14 56 PM

I am confused because the error is occurring in the widget extension target, but this target does not use the facebookutils framework. Podfile is below- ` platform :ios, '12.0' use_modular_headers!

def parse_utilities pod 'Parse/UI', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master' pod 'Parse/FacebookUtils', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master' end

def parse_framework pod 'Parse', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master' end

target 'BackcountrySkiTracker' do parse_framework parse_utilities pod 'INTULocationManager' pod 'DKImagePickerController' pod 'UIImageView-Letters' end

target 'BCWeatherWidgetExtension' do parse_framework

end`

bcbeta avatar Aug 15 '20 03:08 bcbeta

I am still getting the multiple commands error with the most recent master.

Screen Shot 2020-08-14 at 9 14 56 PM

I am confused because the error is occurring in the widget extension target, but this target does not use the facebookutils framework. Podfile is below- ` platform :ios, '12.0' use_modular_headers!

def parse_utilities pod 'Parse/UI', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master' pod 'Parse/FacebookUtils', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master' end

def parse_framework pod 'Parse', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master' end

target 'BackcountrySkiTracker' do parse_framework parse_utilities pod 'INTULocationManager' pod 'DKImagePickerController' pod 'UIImageView-Letters' end

target 'BCWeatherWidgetExtension' do parse_framework

end`

Could you try this and see if it works?

platform :ios, '12.0'
use_modular_headers!

def parse_utilities
pod 'Parse/UI', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master'
pod 'Parse/FacebookUtils', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master'
pod 'Parse', :git => 'https://github.com/parse-community/Parse-SDK-iOS-OSX.git', :branch => 'master'
end

target 'BackcountrySkiTracker' do
parse_utilities
pod 'INTULocationManager'
pod 'DKImagePickerController'
pod 'UIImageView-Letters'
end

target 'BCWeatherWidgetExtension' do
parse_utilities
end

nebitrams avatar Aug 15 '20 06:08 nebitrams

I can't install the FBSDK in the extension because sharedApplication is not available for that target-

Screen Shot 2020-08-15 at 11 39 52 AM

bcbeta avatar Aug 15 '20 17:08 bcbeta

I see this error only during Archiving. Is anyone also facing this issue?

Mine is present only during archiving as well.

Kiplol avatar Sep 29 '20 21:09 Kiplol

Is it possible this issue is related to https://github.com/CocoaPods/CocoaPods/issues/8206? Is everyone reporting this issue using multiple targets in their pod file (e.g. an app extension)?

benpackard avatar Oct 21 '20 01:10 benpackard

@benpackard , yes, I have multiple targets, extensions, and use the Parse/FacebookUtils subspec.

Kiplol avatar Oct 22 '20 16:10 Kiplol

Anyone have any thoughts on what is required to fix this? Or even what kind of expertise is needed? As I understand it, it is currently not possible to archive an app that uses Parse and has any other target, such as a Widget.

I think we can be slightly narrower though - a project that only uses the Parse SDK itself archives ok. It's the use of any submodule that causes issues.

For example, this will archive:

use_frameworks!
inhibit_all_warnings!

target "ParseWidgetTest" do
	platform :ios, '11.0'
	pod 'Parse', '1.19.0'
end

target "CoolWidgetExtension" do
	platform :ios, '11.0'
	pod 'Parse', '1.19.0'
end

But this will not:

use_frameworks!
inhibit_all_warnings!

target "ParseWidgetTest" do
	platform :ios, '11.0'
	pod 'Parse', '1.19.0'
	pod 'Parse/UI', '1.19.0'  # <-----
end

target "CoolWidgetExtension" do
	platform :ios, '11.0'
	pod 'Parse', '1.19.0'
end

The errors are the same as those reported earlier.

benpackard avatar Jan 14 '21 21:01 benpackard

I was able to get my project to archive using these instructions https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1505#issuecomment-632820475, but I do not know enough about cocoapods or frameworks to come up with a more permanent fix.

bcbeta avatar Jan 14 '21 22:01 bcbeta

I wonder if this is a cocoapods issue or something on our Parse pod side. Most of the fixes for this issue for other projects don't work here, and we have to resort to the fix mentioned by @bcbeta. Maybe someone with more knowledge will be able to help.

benpackard avatar Jan 14 '21 22:01 benpackard

While this workaround still works for me, it removes the ability to use use_frameworks!. Has anyone figured out a different workaround?

Kiplol avatar Feb 17 '21 18:02 Kiplol

Hi, I'm still having this issue on Xcode 12.5, cocoa pods 1.10.1, Parse/Core and Parse/FacebookUtils 1.19.2.

`error: Multiple commands produce '/Users/runner/Library/Developer/Xcode/DerivedData/-cifziqnafebkbeeykfagqbprxptp/Build/Intermediates.noindex/ArchiveIntermediates//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.bundle':

  1. Target 'Parse-Core-FacebookUtils-Parse' has create directory command with output '/Users/runner/Library/Developer/Xcode/DerivedData/-cifziqnafebkbeeykfagqbprxptp/Build/Intermediates.noindex/ArchiveIntermediates//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.bundle'
  2. Target 'Parse-Core-Parse' has create directory command with output '/Users/runner/Library/Developer/Xcode/DerivedData/-cifziqnafebkbeeykfagqbprxptp/Build/Intermediates.noindex/ArchiveIntermediates//IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Parse.bundle'`

Kiplol avatar May 10 '21 17:05 Kiplol

Just a note to confirm that this is still an issue using Xcode 13.3.1, cocoapods 1.11.2, and Parse SDK 1.19.3

benpackard avatar Jul 06 '22 13:07 benpackard