Skip to content

Instantly share code, notes, and snippets.

@vinthewrench
Created August 30, 2019 17:01
Show Gist options
  • Save vinthewrench/709f6e717a5becc98fe48ea4d8b30748 to your computer and use it in GitHub Desktop.
Save vinthewrench/709f6e717a5becc98fe48ea4d8b30748 to your computer and use it in GitHub Desktop.
Accessing a ZDCLocalUser object
var localUser: ZDCLocalUser? = nil
ZDCManager.uiDatabaseConnection() .read { (transaction) in
localUser = transaction.object(forKey: localUserID!,
inCollection: kZDCCollection_Users) as? ZDCLocalUser
}
if let localUser = localUser {
print(user.displayName)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment