User setProperty not storing custom objects

Swift SDK 5.7.15

User property won’t store a custom object. If you create relation and autoload it will show up, but trying to set property won’t store it. (473.5 KB)

The internal ticket BKNDLSS-21446 is created.


Is there an ETA for this? I have a work around, but burns 2 API calls.

It is already fixed but requires some more tests and will be available soon.


Could you please check with v5.7.16?

This bug looks like it has re appeared? I updated the test project here.
Create contact
Set Relation

The contact is there,
if you re run, and check for the contact it is missing. (666.9 KB)

Hello @robert-j

I’ve created an internal ticket(BKNDLSS-25279) to investigate your issue.

Regards, Dima.

Hello @robert-j,

Swift-SDK loads currentUser from server every time the app restarts, but loads it without any relations to simplify the response. For now I can advice you to use the loadRelations() method for the currentUser. I’ve created the discussion ticket BKNDLSS-25420 to investigate the possibility of loading all relations for currentUser.


where in the lifecycle does the currentUser get refreshed? i.e when do i call load relations to help ensure sure there is never a nil

Current user is refreshed every time you restart the app (a new session begins) when you call the Backendless.shared.userService.currentUser.
E.g. you can load relations after calling the get current user method the first time when app restarts with stayLoggedIn = true.