简体   繁体   中英

Xcode 11.1 Error: Multiple commands produce

I see that there are several other questions regarding this problem.

Like: Xcode 10 Error: Multiple commands produce

I am asking this a new because it is for Xcode 11.1 and not older version and I think that the other questions have too many responses and people easily can get lost in them. Here we can try to answer using newer information with quicker access.

After update to Xcode 11.1 and update of cocoa pods ( no pods were actually updated, only the pods project was regenerated ).

I started to get the following error with FBSDK:

Multiple commands produce '/Users/myUser/Library/Developer/Xcode/DerivedData/myProject-euqkymjpeftprkgkcjyqpnkbalbr/Build/Products/Debug-iphoneos/FBSDKCoreKit-iOS/FBSDKCoreKit.framework/PrivateHeaders/FBSDKRestrictiveDataFilterManager.h':
1) Target 'FBSDKCoreKit-iOS' (project 'Pods') has copy command from '/Users/myUser/Documents/Workspace/myProjectDir/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKRestrictiveDataFilterManager.h' to '/Users/myUser/Library/Developer/Xcode/DerivedData/myProject-euqkymjpeftprkgkcjyqpnkbalbr/Build/Products/Debug-iphoneos/FBSDKCoreKit-iOS/FBSDKCoreKit.framework/PrivateHeaders/FBSDKRestrictiveDataFilterManager.h'
2) Target 'FBSDKCoreKit-iOS' (project 'Pods') has copy command from '/Users/myUser/Documents/Workspace/myProjectDir/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/RestrictiveDataFilter/FBSDKRestrictiveDataFilterManager.h' to '/Users/myUser/Library/Developer/Xcode/DerivedData/myProject-euqkymjpeftprkgkcjyqpnkbalbr/Build/Products/Debug-iphoneos/FBSDKCoreKit-iOS/FBSDKCoreKit.framework/PrivateHeaders/FBSDKRestrictiveDataFilterManager.h'

I let you know my case. It was related to a Cocoapod Library installed.

The normal steps to install a Cocoapod is, after running the pod install, then you use to go at your "import library section" in your project, then add it.

I removed the library from there, and the problem disappeared instantaneouslly.

Anyway, to use the library still you need to import it as always in your files.

import YourLibrary

class your {

}

Shows the place where the library must be removed from.

In my case the problem was the that those files:

FBSDKRestrictiveDataFilterManager.h
FBSDKRestrictiveDataFilterManager.m

were added twice in the FBSDKCoreKit-iOS project. I deleted the older ones ( by comparing the actual SDK code from GitHub ). I don't know who is to blame Cocoa Pods or Facebook, but if you get that error or some kind of similar one regarding the same file, I suggest that you check for file duplicates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM