Uset custom getpropetry return nil in some objects' properties

Hello, Backendless team
I am trying to retrieve custom user properties but in the object,
I can find some properties inside the object are nil.
Should I run another query for this kind of job?
I thought user.getProperty would return whole object.
here is my code to retrieve array of objects:

 func setupPetArray() {
 let user = UserManager.currentUser()
 if (user != nil) {
 let petProfiles = user?.getProperty("petProfiles") as! [PetProfile]
 for petProfile in petProfiles {

U can find some properties inside the objects are nil.
Thanks in advance.

Hey KenChoi

I’ve shared the topic with our iOS developer and he will answer you asap.

Regards, Vlad

Yeap, as far as my understanding, when I define the property of the object, I should define the type and property name should be the same with console. And then they can load those properties well. However, in this case, they cannot load some properties. In PetProfile class, they return nil in imagePic, neutralized, weight and vaccination properties. Thanks

Hello KenChoi,
Please provide your Application ID and the name of the table you are working with.


my app ID: 6E11C098-5961-1872-FF85-2B0BD0AA0600

and the table name is ‘Users’ and ‘PetProfile’


maybe u need to check with this issue together

Hi KenChoi,
Please check if the properties of Bool and Double are initialised, they must not be optional (?)
I’ve checked your code and everything works fine.


Screen Shot 2017-02-28 at 12.29.31 PM.png

oh I did not know that variables should not be optional… and should be initialized…!

Ok, after I set variables as not optional and initialized, it is working fine. I think these kind of things should be mentioned in the documentation. Thanks for your help ^^