When I use this code to init user with logged in user properties (I need it for future custom class subclassing) and then update this user, it crashes with logs:
2014-03-27 10:20:23.716 DatingService[4078:60b] successfully logged in for = 375251111111
2014-03-27 10:20:27.920 DatingService[4078:60b] -[__NSCFString setProperties:]: unrecognized selector sent to instance 0x175f8a60
2014-03-27 10:20:27.927 DatingService[4078:60b] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFString setProperties:]: unrecognized selector sent to instance 0x175f8a60’
*** First throw call stack:
My code is:
[[API_BaaSManager sharedInstance] loginUserWithUsername:self.textFieldUsername.text password:self.textfieldPassword.text sucessBlock:^(BackendlessUser *regUser) {
BackendlessUser *userTest = [[BackendlessUser alloc] initWithProperties:[regUser getProperties]];
[userTest setProperty:@"yearFrom" object:@1982];
[backendless.userService update:userTest response:^(BackendlessUser *user2) {
} error:^(Fault *fault2) {
[[API_BaaSManager sharedInstance] logErrorWithStartTitle:@"udateUser" error:fault2];
}];
// hide register view
[[Singleton sharedInstance] dismissViewController_animated:YES withCompletion:nil];
} failBlock:^(NSError *error) {
}];