iosxcodefbsdk

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'

Solution

  • 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.