Modify the method:
- (void)getUserID:(void(^)(NSString *result))handler {
[TClient downloadUserID:^(NSString *getIt){
if(handler) {
handler(getIt);
}
}];
}
Since there's an asynchronous network request, the method can not return the result. You should handle result at handler's block.
[self getUserID:^(NSString *result) {
NSLog(@"%@", result); // log user's ID
someObject.userID = result; // and pass it to the other object
}];