FireBase files on Xcode appearing red

I cloned this project from a friends git repository, but these files are showing up red, is there something I can do to fix this?

@Anuraag_Aravindan
make sure that when you open a project that has Pods that you open it with the name of the Project that has the file with the extension of xcworkspace rather than xcodeproj

I am opening with zoyd.xcodeproj but the files are still appearing in red
I got the files from this git repository:

https://github.com/KhilanSurapaneni/Zoyd

You should open the project with zoyd.xcworkspace

Since you have cloned the project, you may have to update the Pods too. Do you know how to do that?

I do not know how to update pods

OK so that suggests to me that you do not have CocoaPods installed on your Mac either.

I have cocoaPods installed but I do not know how to update the pods. I am watching Chris’s video, and the commands are giving me errors

What Mac do you have and what is the version of macOS that you have installed?

I have a 2013 Macbook pro with Catalina

What command were you executing when those errors were reported in Terminal? Can you copy and paste all the output that was generated by that command.

the ommand i put is:
sudo gem install cocoapods

Output was:

Building native extensions. This could take a while…
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210102-2572-1vvycql.rb extconf.rb
checking for ffi.h… *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
–with-ffi_c-dir
–without-ffi_c-dir
–with-ffi_c-include
–without-ffi_c-include=${ffi_c-dir}/include
–with-ffi_c-lib
–without-ffi_c-lib=${ffi_c-dir}/lib
–enable-system-libffi
–disable-system-libffi
–with-libffi-config
–without-libffi-config
–with-pkg-config
–without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in block in try_compile’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in with_werror' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in try_compile’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in block in have_header' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in block in checking_for’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in open’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in open’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in checking_for’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in have_header' from extconf.rb:10:in system_libffi_usable?’
from extconf.rb:42:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/gem_make.out

So the error appears to be related to missing ffi.h which could mean that the following command might sort that out.

sudo gem install ffi

I now run into this error when following your previous instruction:

ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210102-1860-1vf6nmz.rb extconf.rb
checking for ffi.h… *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
–with-ffi_c-dir
–without-ffi_c-dir
–with-ffi_c-include
–without-ffi_c-include=${ffi_c-dir}/include
–with-ffi_c-lib
–without-ffi_c-lib=${ffi_c-dir}/lib
–enable-system-libffi
–disable-system-libffi
–with-libffi-config
–without-libffi-config
–with-pkg-config
–without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in block in try_compile’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in with_werror' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in try_compile’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in block in have_header' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in block in checking_for’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in open’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in open’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in checking_for’
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in have_header' from extconf.rb:10:in system_libffi_usable?’
from extconf.rb:42:in `’

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.14.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/gem_make.out

I appreciate all your help

I don’t know what else to suggest other than on another stackoverflow thread there was a suggestion to install cocoapods using brew rather than gem.

The command is:

brew install cocoapods

I don’t think you have anything to lose by giving that a try.

Unfortunately that did not work, but I appreciate all the help.

Did you fully uninstall cocoapods before trying to install it via brew?

no I did not. Is there a specific command I should input in my terminal

The following is from a thread in superuser.com which may be helpful.

First, determine which version(s) of Cocoapods you have installed by running this in Terminal:

sudo gem list --local | grep cocoapods

You see output similar to this:

cocoapods (0.27.1, 0.20.2)
cocoapods-core (0.27.1, 0.20.2)
cocoapods-downloader (0.2.0, 0.1.2)

Here, I have two versions of Cocoapods installed.

To completely remove all versions, issue the following commands:

sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-downloader

If you have multiple versions installed, like I have, it will prompt you to choice a specific version or all. If you want to uninstall a specific version you can also use the -v switch as follows:

sudo gem uninstall cocoapods -v 0.20.2

Running gem list --local | grep cocoapods again will confirm that Cocoapods has been removed.

You may have residual artefacts in a hidden folder in your home directory. Remove these with:

rm -rf ~/.cocoapods

I was having a similar build issue (because I cloned a project) and it was fixed with a simple ‘pod update’ in the terminal