Setting user details not updating

We are using v16.06.4 of the iOS SDK. We can see that the current version is 16.12, but are unable to easily upgrade at this time. We are having difficulties with updating user details. We have followed the documentations example of = @"John Doe";
[Countly.user save];

This is setting the variable name to "John Doe" correctly, but when save is called is it checking against self.modifications for changes to the user info. At the time that save is called, self.modifications is empty which results in the call not actually making any changes.

In CountlyUserDetails.m we overrode the set function for setName: with

-(void)setName:(id<CountlyUserDetailsNullableString>)name{ self->_name=name; [self set:@"name" value:name]; }

which updates self modification in

- (void)set:(NSString *)key value:(NSString *)value { self.modifications[key] = value; }

resulting in the save function to actually update the backend.

We assume we are doing something wrong for the documented route to not work, but are not sure where we are going wrong to have to change the functionality of the SDK.

If you can point us in the right direction, that'd be great. If we need to update our SDK to fix this then we can push that request through.



1 comment
  • Hi,

    Sorry for the inconvenience, but yesterday I updated the documentation for a future release, so the current documentation is not correct for the current SDK release.

    You need to call recordUserDetails method like this: = @"John Doe";
    [Countly.user recordUserDetails];

    I will revert the updates I made to documentation now.

    Sorry again,

    Comment actions Permalink

Please sign in to leave a comment.