Parse.User usage. #136
Replies: 2 comments 4 replies
-
Alright i've got my code running and working as it was prior to the migration. Things that would've been nice to have known prior to migrating would have been.
so before running User.logout() persist the objectId of the installation. and after logout rung Installation.become(installationId) to keep a consistent installation for app installation, just make sure no sensitive data is persisted on the installation.
if any of my findings are incorrect please do inform me cheers! |
Beta Was this translation helpful? Give feedback.
-
Happy to hear you were able to get your setup working! If you haven't already, I recommend you checkout the following:
The majority of the items you asked about are answered in the aforementioned links and the Playgrounds demonstrate how to properly use the SDK. If you see fit, please star the repo and spread the word about ParseSwiftOG to your colleagues and on your social media platforms! |
Beta Was this translation helpful? Give feedback.
-
Hello! I've recently migrated from ParseObjC till ParseSwift only to find that it too was old and now migrated over to ParseSwiftOG. during migrating to ParseSwiftOG i had a few issues that would be nice to discuss.
var object = SomeParseObject()
try await object.save()
var installation = try await Installation.current()
installation.object = try object.toPointer() <- fail...
seeing as it's value type and no longer mutating i had to refactor similar code to use the returned object rather the previous valueType:
var object = SomeParseObject()
let savedObject = try await object.save()
var installation = try await Installation.current()
installation.object = try savedObject.toPointer()
Would've been nice with a mention in the migration guide 😆
Another issue that i'm currently having is
when changing password it seems that the User.current() gets signed out? this wasn't the case before... can't find any documentation on proper practices for handling login/logout.
Also the entire installation is deleted on logout, how to avoid?
save installation objectId -> Installation.become(objectId) is this how to do it if we want to keep same installation even after logout?
When i log a user out using try await User.logout()
the logout works but if i try to log back in it throws an error that i cannot log in an objectId that differs from User.current().objectId... shouldn't logout remove the "current" user?
Beta Was this translation helpful? Give feedback.
All reactions