Learn Courses My Dashboard

Firebase - Need to Read a Field From a Specific Collection and Document

I’m trying to use Cloud Firestore and I cant figure out how to read a specifc field. So I have the users name that I am trying to recall stored under
"users".email.firstName , firstName being the field. I have the email stored in the email variable and that being said, is it possible to recall the specific string in the firstName field?

Hi Reece,

Have followed the PhotoApp tutorial in the iOS Database course? The process of creating and retrieving records from Firestore is pretty well explained there.

Can you provide a screenshot of your Cloud Firestore “user” record so that we can see the collection layout.

I have the same question, but have not and don’t really want to pay for CWC+

Morris,

I guess it depends on what your ultimate goal is. If you intend on making a career out of iOS Development then some investment in your training is worthwhile. I think the courses offered by Chris Ching will equip you with the necessary skills to achieve that. You can subscribe monthly or annually.

On the other hand, if you are only learning it for interests sake then it’s up to your whether you subscribe.

The Photo App is a reasonably large tutorial consisting of 12 Lessons totalling about 4.5 hours.

Subscription details here: CodeWithChris Courses (Learn with Free Tools and Courses)

I am 13 and just figuring out what I would like to do in life. For this app i would like to pull the “CurrentRiddle” and “PreviousRiddle” from firestore and set UILabels to show this data.

For me it wasn’t working because I had my code under else and not under != nil.