Fixed bug in UsergridClient with saving the shared UsergridDevice on UsergridClient initialization.
Project: http://git-wip-us.apache.org/repos/asf/usergrid-swift/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid-swift/commit/0869e82e Tree: http://git-wip-us.apache.org/repos/asf/usergrid-swift/tree/0869e82e Diff: http://git-wip-us.apache.org/repos/asf/usergrid-swift/diff/0869e82e Branch: refs/heads/master Commit: 0869e82eed5af9583b4fdb4fb1007899ddce4ba5 Parents: a122207 Author: Robert Walsh <[email protected]> Authored: Fri Sep 16 16:00:42 2016 -0500 Committer: Robert Walsh <[email protected]> Committed: Fri Sep 16 16:00:42 2016 -0500 ---------------------------------------------------------------------- Source/UsergridClient.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/0869e82e/Source/UsergridClient.swift ---------------------------------------------------------------------- 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 @@ public class UsergridClient: NSObject, NSCoding { 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 -
