title: Can this Singleton object use type stored properties instead in Swift2?
body: <p>I read that creating a struct or global constant was required to implement the singleton pattern in Swift as "Swift doesn’t support type stored properties"</p>
  
  <pre><code>final class BackupServer {
  
      let name:String;
      private var data = [DataItem]();
  
      private init(name:String) {
          self.name = name;
          globalLogger.log("Created new server \(name)");
      }
  
      func backup(item:DataItem) {
          data.append(item);
          globalLogger.log("\(name) backed up item of type \(item.type.rawValue)");
      }
  
      func getData() -&gt; [DataItem]{
          return data;
      }
  
      class var server:BackupServer {
          struct SingletonWrapper {
              static let singleton = BackupServer(name:"MainServer");
          }
  
          return SingletonWrapper.singleton;
      }
  }
  </code></pre>
  
  <p>Is this still true in Swift2? I am learning how to implement the Singleton pattern in Swift for my own interest and don't need to be told it is an anti-pattern. The <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Properties.html" rel="nofollow">docs</a> seem to say that stored type properties are possible</p>