Notification of Obtaining the User Profile Picture
Notification Description
A notification is sent for the access party to return the profile picture corresponding to the unique user ID.
Method Definition
1
|
- (void)downloadHeadPortraitWithThirdAccount:(NSString *)thirdAccount account:(NSString *)account number:(nonnull NSString *)number completionBlock:(void(^)(NSError *_Nullable error, NSString *_Nullable headImagePath))completionBlock; |
Sample Code
- (void)downloadHeadPortraitWithThirdAccount:(NSString *)thirdAccount account:(NSString *)account number:(NSString *)number completionBlock:(void (^)(NSError * _Nullable, NSString * _Nullable))completionBlock { NSLog(@"thirdAccount:%@ -- account:%@ -- number:%@", thirdAccount, account, number); if (completionBlock) { /// Return the image path to the SDK. NSInteger index = arc4random() % 3; NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"head_icon_%lu", index] ofType:@"png"]; completionBlock(nil, path); } }
Precautions
- Set the headPortraitApiHandler proxy during SDK initialization or set the proxy on the target page.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
thirdAccount |
NSString * |
This parameter is preferentially used in the app ID login scenario. |
account |
NSString * |
This parameter is preferentially used in the account and password login scenario. |
number |
NSString * |
This parameter is preferentially used in the cross-enterprise scenario. |
completionBlock |
void(^)(NSError *_Nullable error, NSString *_Nullable headImagePath) |
Result callback. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot