title: Singleton pattern in objc, how to keep init private?
body: <p>How can i make sure user do not call init, instead client should call sharedSingleton to get a shared instance.</p>
  
  <pre><code>@synthesize delegate;
  
  - (id)init
  {
      self = [super init];
      if (self) {
          // Initialization code here.
      }
  
      return self;
  }
  
  + (LoginController *)sharedSingleton
  {
      static LoginController *sharedSingleton;
  
      @synchronized(self)
      {
          if (!sharedSingleton)
              sharedSingleton = [[LoginController alloc] init];
          CdtMiscRegisterConnectionChangeListenerObjc(test_ConnectionChangeListenerCallback);
          return sharedSingleton;
      }
  }
  </code></pre>