Once completing this, I tried getting a little more advanced but go stuck with trying to assign data from firebase to assign it to a global variable to be used in other functions, labels and alerts to make everything easier and simpler. I tried many hours looking into this and even asked people in stack-overflow, but it was a little too advanced for me to understand the asynchronous calls, or how to use them and assign them to a global variable still. Can someone help me please?
Hi @fa95, thank you for posting here and it’s awesome to hear that you’ve completed the Firebase tutorial! Below is a quote on what an asynchronous call is from a helpful tutorial here, Grand Central Dispatch.
An asynchronous function returns immediately, ordering the task to be done but not waiting for it. Thus, an asynchronous function does not block the current thread of execution from proceeding on to the next function.
I would recommend taking some time to read the tutorial above because it’s helpful when it comes to understanding Grand Central Dispatch, and if you are a subscriber there is a video course on concurrency with GCD.
Hopefully this will point you in the right direction with understanding asynchronous calls. Happy coding!