Update your profile
Update the signed-in user’s profile with OpenIM iOS SDK.
Retrieve the current OIMUserInfo first, then modify only fields owned by your profile editor, such as the nickname, avatar, or ex. Do not construct a new object with only a few fields set, because its default scalar values may overwrite existing data.
current.nickname = nickname;
current.faceURL = avatarURL;
[[OIMManager manager] setSelfInfo:current onSuccess:nil onFailure:nil];ex is replaced as a complete string. Parse it and merge your application's namespace before updating it. The success callback, onSelfInfoUpdated:, and a subsequent query are three separate stages.
This page is the sole owner of onSelfInfoUpdated:. Use the same stable OIMUserListener instance when calling addUserListener: and removeUserListener:, and replace the profile snapshot for the current account when the delegate is called.
Was this page helpful?