title: Need help in iOS app's architecture. Use Singletons or not?
body: <p>I have a class <code>ServiceClass</code>, a closure function in this class eg <code>LoginViaEmail</code>, calls <code>APILayer</code>. <code>APILayer</code> calls <code>HttpLayer</code> and <code>JSONHandler</code> and returns output to <code>ServiceClass</code>. <code>ServiceClass</code> further returns some info to <code>ViewController</code> when <code>completionblock</code> is received. </p>
  
  <p>My questions are</p>
  
  <ol>
  <li>Shall I make <code>ServiceClass</code> as Singleton? But then everybody says that they are anti-pattern and not a <a href="https://stackoverflow.com/questions/137975/what-is-so-bad-about-singletons?rq=1">good approach</a>.</li>
  <li>If they are so bad, why does <a href="https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/Singleton.html" rel="nofollow noreferrer">Apple</a> use them? eg NSFileManager, NSWorkspace, UIApplication etc,</li>
  <li>If not Singleton, then what shall I use? Make instance of <code>ServiceClass</code> every time I use it? Wouldn't that take too much memory?</li>
  </ol>