CurentUser property not updated on different devices (iOS)

Hi,
Are there ways to check if there’s newly created properties or property update for current user?
I have used two devices testing my App both logged in with same user. Because the App has not complete yet, so the backend tables varies on the way. I added a new property for current user on my iPhone, and the current user’s property was updated without any problem. Then I test the App with another device, which logged in with the same user before I added the property, was not updated with the new property.
Is there a way that I can refresh the current user in order to get the newest state of the user?

Hi Weinan,

This should do it. The code is pretty much self-explanatory, but if you have any questions, let me know:

        let currentUser = backendless.userService.currentUser
        let userObjectId = currentUser.objectId;
        let userObject = backendless.data.of(BackendlessUser.ofClass()).findID(userObjectId)
        currentUser.updateProperties(userObject.getProperties())

Regards,
Mark

Thanks Mark!

If you could add a function like [backendless.userService fetchCurrentUser], that would be super convenient for us. :wink: