title: How to go about grabbing data from firebase for use across every class in my app - swift ios development
body: <p>When the app loads, I need the family and name for the current user that is logged in to be stored in a variable that can be accessed by every class and view controller in my app. Currently, everytime i need to access, say, the name in a different class I have to download a snapshot again. I want it so i only have to download a snapshot that contains essential user data that can be used across the whole app.</p>
  
  <p>It was recommended I make a User class and store the data in here, how would I go about doing that?</p>
  
  <p>Thanks</p>
  
  <p>Database Structure:</p>
  
  <p><a href="https://i.stack.imgur.com/abob4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/abob4.png" alt="database screenshot"></a></p>