title: Where to put network requests when app first starts
body: <p>When app starts I need to do some network requests. For example, App fetches my servers public key to operate a secure restful connection. If it can get the key, It does other network operations. My problem is that these operations are nested so one is finished, other one start but If there is a problem  with one of them I need to display a message. I have AppDelegate class and SplashViewController in which I can do these operations. I'm not sure what will be the best approach in terms of speed when doing that;</p>
  
  <p>1-) Start operations in AppDelegate and with notification, notify splashviewcontroller and display message If there is an error.</p>
  
  <p>2-)Start operations in SplashViewController class.</p>
  
  <p>3-)Wait all network operations to be finished before opening SplashViewController (I'm not sure If I can display error message in AppDelegate class)</p>
  
  <p>Example code I run at AppDelegate;</p>
  
  <pre><code> APIClient.checkCMS { (result) in
    switch result{
      case .error(let error):
          print(error)
          //Notify SplashViewController?
      case .success(let returnedObject):
          print(returnedObject)
          print("Devam")
                 }
    }
  </code></pre>