1

I'm trying to install the Firebase Analytics pod into my project using Cocoapods. After successfully running pod install and then building my project I get the build error unable to spawn process (Argument list too long).

From my understanding this error has to do with the header search path arguments being too long. When I set my workspace to use the legacy build system the project builds just fine. I however, only want to use the new build system.

It seems to fail when running the shell script "Check Pods Manifest.lock" step of the build process.

PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/xxx/Library/Developer/Xcode/DerivedData/xxx/Build/Intermediates.noindex/xxx.build/Debug\ (Staging)-iphonesimulator/OV.build/Script-05BB3CCD2FBD4842F78B0F4F.sh (in target 'xxx' from project 'xxx')
    cd /Users/xxx/Documents/Projects/ov-ios
    /bin/sh -c /Users/xxx/Library/Developer/Xcode/DerivedData/xxx/Build/Intermediates.noindex/xxx.build/Debug\\\ \\\(Staging\\\)-iphonesimulator/xxx.build/Script-05BB3CCD2FBD4842F78B0F4F.sh

error: unable to spawn process (Argument list too long) (in target 'xxx' from project 'xxx')

It should be noted that I have multiple build configurations for my project like so. Unsure if this could be a cause of the argument list being too long.

Debug (Local)
Debug (Staging)
Debug (Production)
Release (Local)
Release (Staging)
Release (Production)

Pod File:

platform :ios, '13.0'
use_frameworks!

def my_pods
    pod "Apollo", '0.16.0'
    pod 'AlamofireImage', '3.5.2'
    pod 'KeychainAccess', '4.1.0'
    pod 'SwiftUIRefresh', '0.0.1'
    pod 'Firebase/Analytics', '6.14.0'
end

target 'MY Project' do
  my_pods
end
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
xanderbuck
  • 221
  • 2
  • 5

4 Answers4

1

Open 'File -> Workspace Settings' and set Build System to Legacy Build System. This solved my issue with Firebase CocoaPods installation.

Boris Nikolic
  • 746
  • 14
  • 24
0

Try disabling the cocoapods stats using this in your .podfile or setting your environment variable directly using export

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

For more info on the stats visit repo

Or try following the thread OR thread2 for more options

sheetal
  • 3,014
  • 2
  • 31
  • 45
  • didn't have any luck with this. Is there a special way I'm supposed to set that environment variable? I pasted that line below "use_frameworks!" in my podfile shown in my original question above. – xanderbuck Jan 02 '20 at 20:33
  • You can set it at the top of the podfile. This is basically how we set environment variables in a ruby file. Or you can directly try setting the env variable in your terminal or bash with the same key value as above – sheetal Jan 02 '20 at 20:40
0

Delete /Users/issingh/Library/Developer/Xcode/DerivedData
Delete 'build' folder of the app.

Ishita Singh
  • 297
  • 1
  • 6
0

You can try changing you Derived Data folder location near to Disk Root workspace settings

  1. Click in File
  2. Access workspace settings
  3. In Derived Data change to Custom Location
  4. And then set a new short path