I’m on 4.0b12 and it looks like the userservice findById method is returned the BackendlessUser as a mutabledictionary. This is causing crashes whenever I try to do getProperty.
Are you using it with the Cloud version?
Do you use the dictionary-based or the class-based approach when you make the findById call?
Hey Mark
Yes I’m using the cloud version.
I believe I’m using the class-based approach, I just need to use the correct responder type right?
BackendlessUser *user = [backendless.userService currentUser];
[backendless.userService findById:user.objectId response:^(BackendlessUser *resultUser){
delegate.user = resultUser;
NSLog(@"user loaded");
}error:^(Fault *fault){
NSLog(@"load user error");
}];
Hi Allen!
Yes, this is the class-based approach. Could you also try the following (where YOUR-CLASS would be BackendlessUser):
https://backendless.com/docs/ios/doc.html#data_basic_search
Looks like that did it! Finding the user via the datastore apis explicitly using the class-based approach works.
So does that mean the userService apis are defaulting to dictionary based now?
Thanks!
We’re going to investigate this. It should be returning a strongly-typed object. I will open an internal ticket to check this.
Hello Allen,
Please update SDK to the new version 4.0b13. This issue has been fixed.
Regards, Olga