Fixed bug in UsergridClient with saving the shared UsergridDevice on UsergridClient initialization.
diff --git a/Source/UsergridClient.swift b/Source/UsergridClient.swift
index 81fe3a6..24bc7aa 100644
--- a/Source/UsergridClient.swift
+++ b/Source/UsergridClient.swift
@@ -130,7 +130,9 @@
if persistCurrentUserInKeychain {
self.currentUser = UsergridUser.getCurrentUserFromKeychain(self) // Attempt to get the current user from the saved keychain data.
}
- UsergridDevice.sharedDevice.save(self)
+ DispatchQueue.global().async {
+ UsergridDevice.sharedDevice.save(self)
+ }
}
// MARK: - NSCoding -