Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class AccountStore {
// Doesn't work yet
class var sharedStore = ACAccountStore()
// This works although I'm unsure of the optional
class func sharedStore() -> ACAccountStore {
var store: ACAccountStore? = nil
var token: dispatch_once_t = 0
dispatch_once(&token, {
store = ACAccountStore()
return store!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment