error: unable to spawn process (Argument list too long) in Xcode Build

后端 未结 11 2030
一生所求
一生所求 2021-01-11 10:10

I am getting this error:

\"error: unable to spawn process (Argument list too long)

** ARCHIVE FAILED **

The following build co

11条回答
  •  执念已碎
    2021-01-11 11:14

    In my case, it was about custom configurations in .xcconfig files. My config files were including Pods configurations like:

    // Development.xcconfig
    
    #include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug (development).xcconfig"
    #include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.debug (development).xcconfig"
    
    #include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release (development).xcconfig"
    #include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.release (development).xcconfig"
    
    // Production.xcconfig
    
    #include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug (production).xcconfig"
    #include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.debug (production).xcconfig"
    
    #include "Pods/Target Support Files/Pods-MyProject/Pods-MyProject.release (production).xcconfig"
    #include "Pods/Target Support Files/Pods-MyProjectTests/Pods-MyProjectTests.release (production).xcconfig"
    

    This produced the error you mentioned, when I added Firebase pods into my Podfile.

    So to make this compile again I had to:

    1. remove all above inclusion,
    2. make them explicitly set in the Project -> Info -> Configuration, as follows:

    Quick tip:

    If you don't want manually setting up corresponding target configurations (those with red icon), mark them as None and run pod install. This will automatically change it for you.

提交回复
热议问题