iosxcodexcasset

Can't assign xcassets to the main target on Xcode 11


On Xcode 11 my .xcassets, that don't cause any issue on Xcode 10, cause the compilation to fail with the following message:

error: Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/project-enjiypsgxtcdbnaripixgtnjlagx/Build/Products/Debug-iphonesimulator/project.app/Assets.car':
1) Target 'project' (project 'project') has compile command with input '/Users/user/sandbox/project/Resources/buttons.xcassets'
2) That command depends on command in Target 'project' (project 'project'): script phase “[CP] Copy Pods Resources”

The only way I'm able to compile the project is by removing the .xcassets from the target with the obvious downside of having them not available on the build.

PS: This is happening for 2 ObjC projects.


Solution

  • Add below line at the top of your pod file, right after platform :ios

    install! 'cocoapods', :disable_input_output_paths => true
    

    Reference