iOS Databases with UIKit: Module 4 Lesson 3

I cannot get this component to work for email authentication. I found an existing post and asked this question there but it is an old post and haven’t gotten any responses. There was a comment below the video to import FirebaseEmailAuthUI but Xcode says there is no such module.

The Firebase instructions simply said to add the package via the Xcode package manager, which I did. Afterwards, I did try to add FirebaseUI/Email to my podfile and then run pod install from the project directory in terminal but it fails and I’m guessing it’s because I used the Package Manager to begin with. I’ve also tried removing the package from Xcode and running only the pod install but it still fails. I’m not sure what else to do at this point. I’ve even gone back in, literally added every Firebase package option and it still tells me there is no such module when importing FirebaseEmailAuthUI…

I’m at a stand still with PhotoApp that this module is covering. Is Firebase the standard for stuff like this? Is there something different I can try to figure out if Firebase won’t work for me?

I would say that Firebase has AGAIN changed their frameworks. It’s frustrating for all concerned that this product keeps changing how it works.

Are you installing the frameworks using cocoapods or Swift Package Manager?

When I followed the course and built the project ages ago, I had to make changes since at the time I followed the course there were changes to the Firebase frameworks from when Chris Ching built the course. I got it working with import FirebaseEmailAuthUI and my Podfile contained the following (and still does but I have not run the App since):

   pod 'FirebaseUI'
   pod 'Firebase/Auth'
   pod 'Firebase/Firestore'
   pod 'Firebase/Storage'

What do you have in your Podfile?

I used the Package Manager because as I was trying to follow Chris, the site was different and didn’t mention the podfile. I did later try it though but it kept erroring. I tried all those in the pod file but I also tried those without FirebaseUI and still failed. My podfile currently has:


   pod 'Firebase/Auth'
   pod 'Firebase/Firestore'
   pod 'Firebase/Storage'

Yeah if you use SPM it does not give you access to the required framework. I don’t know what the solution is at this point and I don’t know if Chris Ching plans on revisiting the project since SwiftUI is the focus of all the tutorials for the moment.

Is Firebase the only, or best, option for using databases? This part is a black box for me right now…so many questions and finding solid answers on the web has been tough. Just an example, you make an app that allows a user to have a profile, request quotes from a particular vendor and be able to take pics to send, and the vendor can communicate back (how does that even work?), and many more questions around that type of stuff. My brain is on overdrive and probably ready to explode, LOL.

Firebase seems to offer the best “Cloud” based storage solution and just happens to be the most popular as well. There may be others although I have never investigated any. I don’t know if Chris Ching has used others nor have I asked him.

Hi, I had the same problem while using SPM…but I switched to Pods and installed all the necessary plugins/libraries including “FirebaseUI” then everything went well with the project (using the same code as Chris).

Interesting. The thought of having to start over AND go back to the pod setup to make sure I don’t miss something is a little demotivating so I’m going to take a break for a few days, though I’m afraid that will cause me to forget more…double edge sword I guess.

Okay, I came back to the PhotoApp project. I deleted it and started over. I went back to module 1 where he takes through the pod install. Mine is installed as the version number appeared when I checked. The next step was installed Alamofire. So I added it to my pod file, saved it, and then exited the file. I closed the file then went back to my terminal window where I had already drilled into the project directory and pod install and it failed with the following error. Have you seen this before?

There were 637 lines of stuff it spit out onto the screen before this mention Ruby…

[NOTE]

You may have encountered a bug in the Ruby interpreter or extension libraries.

Bug reports are welcome.

For details: https://www.ruby-lang.org/bugreport.html

[IMPORTANT]

Don’t forget to include the Crash Report log file under

DiagnosticReports directory in bug reports.

zsh: abort pod install

steve@Steves-MacBook-Pro PhotoApp %

It’s one of the best, but it depends on the kind of database you’re wanting. Only a cloud db, or local only?

Realm is another local database and so is AWS Amplify DataStore

AWS Amplify has a cloud component to it, and Realm, I think, can work with MongoDB in the cloud (considering MongoDB owns them)

You can make your own API with Vapor and use different databases, but I would NOT recommend this to a beginner, it’s like re-writing the wheel when it isn’t necessary

Understood. As you can see from above, pod install isn’t working. I’m wondering if I’m missing some software of some kind on my Macbook.

I found a solution. According to the article I found, CocoaPods isn’t supported on the M1 chip, which is what I have in my Macbook Pro. However, this article shows you how to work around that and it worked for me, except now when I do the initial build, I get a long list of issues with the yellow exclamations. The dropbox link contains the file with all the issues as it is too much text to paste in this post. I think I’m going to have to give up on this app module and possibly Firebase and look for some alternative…