Introduction to HealthKit in iOS8
Imagine a situation where your doctor could immediately get your health information right from your phone, or your dietician looking at your screen to check your calorie intake. Reality is closing in on our imaginations, and the day that you can expect such conveniences is not too far off with iOS8! The Health app that is available with this version of iOS serves as a central place to store all your health data including body measurements, fitness data and tracking information about your nutrition and sleep. Other than providing all these details in one place, it could also provide a compact emergency card with your important health information that can be accessed even when your phone is locked.
Developers would now be able to use the HealthKit provided by Apple to integrate their health and fitness apps with the Health app. By doing this, they could store their data with the app, as well as retrieve other relevant pieces of data from it if necessary.
Why should you use HealthKit?
As a developer of a health or fitness app, you might wonder why you would need to sync up with the Health app when you are already providing the information to the user through your interfaces as well. Here are some compelling reasons why you should consider it:
Retains the focus of your fitness app: Using the HealthKit would help store the information derived from your app in a central location, thereby enabling further manipulations and interpretations of the data. Your app could focus on the core functionality and leave other aspects to specialized apps, which would lead to excellence in your focus area with more time devoted to it.
Provides an integrated user experience: A user might use your app for a specific part of their health or fitness routines, but would like to use the data provided by it for other inferences such as to calculate daily nutrition intake. Instead of manually checking and entering the value each day, if it is possible to access it directly, it definitely contributes to a smoother and more memorable experience for the user.
Improves data sharing between apps: Developers need not create new APIs every time a new fitness app comes on the market, but instead only make effective use of the HealthKit to create and maintain a good connect with the central Health app. The user too, would only need to set access permissions once for each app, and enable mutual sharing and the most efficient use of his or her health information.
Points to remember when using HealthKit
Using HealthKit is a great option for developers and users alike, but there are some reminders that are important to note before you make a start:
Data Security: The Health app takes security of user data very seriously, and encrypts the information when the phone is locked or if data is backed up to the cloud. It is important to carry forward this concern in the developers’ use of the Healthkit as well. Health and fitness data is very private to every user, and arbitrary use of the same could have major implications. Healthkit allows the user to set permissions on every piece of data, but it is the responsibility of the developer that the provided data is not used for anything other than the main purpose of the app. For example, this means that advertising platforms or data resellers should never gain access to it. Some exceptions might be if the user agrees to share the information for a cause like medical research, but once again this could only be done on explicit approval by the user.
Social media use: The integration of all the health and fitness data of the user could contribute to an enhanced social media experience. Similar to the user agreeing to share any updates from your fitness app to their social media platform, any data obtained by your app from the Health app could also be used only if the user wishes to. For example, a group of fitness enthusiasts who would like to compare their step counts or calorie burns could now do so with ease as different users could use diverse fitness apps to save this data to the central Health app.
Workflow details: It is important to remember that only developers of health and fitness apps that require the relevant data for their functionality should use Healthkit to interact with the Health app. Other details such as asking user permissions at the correct time and not using Health app icons or the term “HealthKit” in your user interfaces are also explained in the Human Interface Guidelines for HealthKit.
As Apple says in its Health app introduction, “How are You?” now really does have a really accurate answer! The efficient implementation of HealthKit helps provide a detailed and unified image to the user of all his or her health and fitness data, and this could have many diverse applications in the long run.