Firebase Authentication tutorial issue

I am running into multiple build issues and when I try and fix them more pop up. I copied the files into a existing project. Perhaps that is the issue and I did that part wrong?

Hi Danny,

No you can’t copy the files across and expect the project to work. There are a whole lot of other settings unique to the App you copied those files across from that don’t match up with the destination App.

You need to go through the CocoaPods installation process in the same way that you would have done on the original project. That also includes adding the GoogleService-info.plist file which is unique to each Firebase/Project combination.

Hi Chris, thank you for taking the time to reply. I did use my own CocoPOs installation and I am using my own plist…I’ve slowly been fixing it but still have about 10 errors impeding a successful build.

Hi Danny,

So the errors listed in your initial post is after you installed CocoaPods for the project?

Can you post the errors as they relate to the line of code in your project. That’s easier to figure out what you need to do to solve the problem.

By that I mean provide a screen capture where the error shows up against the line of code.

Sure, I will shoot some tonight. When I get back on to work on it.

Here is the screens of the 7 remaining errors…6 refer to one line and the other is FirebaseApp isn’t recognized. Which was on two files, I fixed one by importing FirebaseCore instead of Firebase. But that didn’t fix that one.

In your first screen capture you can’t do whatever it is that you are trying to do with the line:

static func /Users/........

What were you attempting to do with the Launchscreen.storyboard?

The source files had it in there already, I only changed the path to where my storyboard was located. Should I delete it?

I don’t understand what you have done that you would need to tell Xcode where the storyboard resides. By default when you create a project Main.storyboard and Launchscreen.storyborrd are part of the App Bundle and Xcode knows where to find them.

Besides, Launchscreen.storyboard should have nothing in it anyway other than a blank ViewController.

If you are new to App development you need not worry about the purpose of Launchscreen.storyboard until such time as you are submitting Apps to the App Store and only then are they really of any significance.

I was able to clear out the errors and the build succeeds but when I launch the simulator I only get a blank white screen and then it goes black. I noticed my google plist and podfile have question marks next to them. Should I delete both and re-add?

In which storyboard did you do all the configuration? I’m assuming that it was done in Main.storyboard?

Yes, the Main.storyboard

Hmmmmmmm, something is broken I reckon. Probably a lot to do with copying in files from the previous project. If you want to zip up the entire project and post it to DropBox and add a link in a reply I can have a look at it for you when I get a chance later today. I have to head out and pick up a car that has been dyno tuned for me. A few hours away.

The other alternative is to start again (sadly).

Appreciate it, I am zipping up the project now.

Chris, here is the link: project files

Hi Danny,

Fixed it for you. The Info.plist file was messed up so I added the elements that were missing and it now works.

Link to your project: Project archive (zip)

Thanks Chris, appreciate you taking time out of your day to fix the issue. Was the info.plist the only thing broken?

Hi Danny,

As far as I can remember it was just a couple of parameters missing from the info.plist file. They were related to Main.storyboard. See the attached image where the arrows indicate the parameters that were missing:

It took me a while to find out what the issue was but having set breakpoints in the ViewController code and never getting the program to halt there it became obvious that something was amiss with the storyboard. I learnt something in the process too so it’s another little piece in the jigsaw puzzle of how the parts of the project fits together.