In my application integrated HealthKit Framework.
I want to get few Identifiers of HealthKit Data which is around 25.
As of my knowledge i have to fetch each Identifer like below
NSDate *startDate, *endDate;
if(!error && results)
for(HKQuantitySample *samples in results)
// your code here
You should perform your queries parallel. This enables HealthKit to perform your queries efficiently. HealthKit does the optimization for you if you do it this way. The most elegant and readable way to do this is probably a loop. But writing 25 lines does the same.
You don't need to do anything to get you queries into a background queue. HealthKit does this for you.
Some times later you'll get your 25 callbacks.