Learn Courses My Dashboard

Cocoapods won't properly install Firebase SDK

Hello! So, for the past week I’ve watched about 7 different tutorials on connecting a database to an XCode project, and all without success. I believe the code itself isn’t wrong, as no errors show up, and the code is often double-checked with what the author has on Github. I suspect the issues is arising from connecting the actual database to my XCode project. In previous videos, Firebase SDKs were installed directly through XCode, I would click “Add Packages”, copy-past this link, and then install the required SDKs. In Chris’s tutorial, he uses cocapods. After following his steps with caution, no SDK’s are actually imported within by Pod file:

. All those folders are empty. Has anyone had a similar error? I have an M2 Chip, so I don’t think the chip is the issue. I’ve also tried to follow the different steps stated here. Could someone please guide me or suggest a different way to approach this?

@martinthuriaux

Hi Martin,

Welcome to the community.

Some of the older tutorials used Cocoapods but you really should use Swift Package Manager which, as you’ve already experienced, is much easier. Cocoapods are rapidly falling out of favour these days.

The process of using cocoapods requires you to install cocoapods on your Mac prior to attempting to instal Pods in an Xcode project. If you have a Mac with an M1 chip the process of installing cocopods is frustrating at best and downright hair pulling at worst. Honestly, just give them a miss and stick to SPM.

@Chris_Parker

Hi Chris,

Thank you for the quick response.

Is there any additional download required for SPM? As far as I know, my Xcode project cannot properly connect to the firebase. Also, is there a certain tutorial you recommend?

You should follow the Firebase docs, what’s the error (or issue that you’re seeing)

Hi Martin,

Which tutorial series have you been watching? Can you provide a link to it so that I have a rough idea what you’ve seen so far.

Cheers