SDKsiOS
Retrieve your profile
Retrieve the signed-in user’s profile with OpenIM iOS SDK.
Retrieve the full profile snapshot for the currently signed-in user using getSelfInfoWithOnSuccess:onFailure:. This method requires no arguments.
Code example
[[OIMManager manager] getSelfInfoWithOnSuccess:^(OIMUserInfo *user) {
[profileStore replaceCurrentUser:user];
} onFailure:^(NSInteger code, NSString *message) {
NSLog(@"getSelfInfo failed: %ld %@", (long)code, message);
}];Return value
The onSuccess callback delivers an OIMUserInfo object containing the authenticated user's current settings:
| Property | Type | Description |
|---|---|---|
userID | NSString * | The authenticated user's unique identifier. |
nickname | NSString * | User's profile display name. |
faceURL | NSString * | User's profile avatar URL. |
ex | NSString * | Custom application extension metadata string. |
globalRecvMsgOpt | OIMReceiveMessageOpt | Account-level global message reception policy. |
This query retrieves an instantaneous snapshot and does not emit delegate updates. To update these attributes, refer to Update your profile.
Was this page helpful?