Hey, quick question. In the previous section. you told us to write JSON to create objects, but you didn’t tell us where this JSON goes. I see in this video you’re accessing it through the database. I would like to know how the JSON got into the database. Were we supposed to do that within the Firebase terminal? If so, where?
This may be too noobie of a question for this References section, but I am trying to keep up with the Grocr app while also building a separate, similar app from scratch on the side. The Grocr app does not complain at all about the print(rootRef), etc. statements, but on my mirrored project, I get a warning “Expression implicitly coerced from ‘String?’ to ‘Any’” for each of my print() statements. Is this simply a matter of Grocr app’s setting suppressing that warning or is there a deeper issue I need to explore? Uploading a screen shot as well for demonstration purposes.
If it helps at all, here is a comparison of the two console logs as well from when they run. Grocr-final seems clean and in control, but, armed with the same basics in AppDelete and the one ViewController I have in Paragauges, I get both warnings and more not-do-clean messages logged to the console.
Hey there, it’s been awhile since I last worked on this project but the warnings may have been suppressed. Typically, we don’t do that, but I used the project from an existing tutorial so that setting may be in place.
Essentially, the warning is just letting you know that you are trying to print out an optional as that key may not exist. You can do something like this:
print(rootRef.key ?? "root key has no value")
This will print out the key value, but if there is no value present, then the string “Root key has no value” will printed. You can also put those variables in an if-let block or guard statement (the video tutorial should really should do that).
Thank you, Brian! That is perfect. I have to say everything has been working great and my mirror app is all up and running happily. I had been struggling with AWS Amplify with React the past few weeks, and in a matter of a weekend, thanks to your course, I was able to get introduced to Firebase and get my app to a deployable state.
It has been an excellent course and I will DEFINITELY provide it with five stars all the way once I’ve completed it.
BTW: I have modeled the user registration/login exactly ssd done in the course, but was wondering if there is a tutorial/project/lesson on how best/typical to provide a themed register and subsequent profile/setting (vs. just the alert style register). If you know of anty resources off the top of your head, I am all ears.