my call makes a call to HKSampleQuery method initWithSampleType that queries information from healthkit store. I want the main thread to wait until the the query is over so that the block handler updates the global variables in the custom class.
I understand concurrency but haven't used it enough. Please help me with this one.
my code goes like this...
[self methodone];
do something based on result
-(void)methodone
{
api call with blockhandle
{ set result to global variables in block};
}