We looked previously at the basic HKSampleQuery and the HKAnchoredObjectQuery. Both provided ways to query samples in HealthKit and work with data that the user had provided permission for.
The next query we will look at is the HKStatisticsQuery. This query is particularly interesting to those who want to calculate sum, minimum, maximum, or average values.
Lets begin by downloading the project from where we left off last time.
[Read more…]
When needing to put an alert on the view of your app the previous way to handle this was with a UIAlertView or UIActionSheet. Both of these were deprecated in iOS 8 which means if you are targeting newer versions of iOS, which you should be in many cases, you now need to use UIAlertController. If you want to see how alerts worked in iOS 8 or below, you can find an example in the