HealthKit Development Quick Start Tutorial HealthKit framework System Create health AppID

Source: Internet
Author: User

HealthKit Development Quick Start Tutorial HealthKit framework System to create healthy appidhealthkit development preparation work

When developing a HealthKit application, you first need to explain what classes are in the HealthKit, which are the features of the Health app on iOS. This section will explain these issues.

HealthKit Framework System

For a class of applications, to develop, you first need to familiarize yourself with its framework, the class. The following is a summary of the classes used in HealthKit, as shown in table 1-1.

1-1 HealthKit Frame System

Class

Function

NSObject

NSObject is the root class

Hkbiologicalsexobject

Can enumerate gender

Hkbloodtypeobject

Used to enumerate blood types.

Hkhealthstore

Manage data

Hkobject

All data stored in HealthKit is a subclass of Hkobject. It's an abstract class.

Hksample

Heathkit sample, representing data related by start time and end time

Hkcategorysample

Status samples

Hkcorrelation

Composite data samples

Hkquantitysample

Quantity sample

Hkworkout

Fitness samples

Hkobjecttype

To indicate what type of data it is, there are dozens of types in HealthKit

Hkcharacteristictype

The Hkcharacteristictype class is a specific subclass of the Hkobjecttype class

Hksampletype

The Hksampletype class is a specific subclass of the Hkobjecttype class

Hkcategorytype

The Hkcategorytype class is a specific subclass of the Hkobjecttype class

Hkcorrelationtype

The Hkcorrelationtype class is a specific subclass of the Hkobjecttype class

Hkquantitytype

The Hkquantitytype class is a specific subclass of the Hkobjecttype class

Hkworkouttype

The Hkworkouttype class is a specific subclass of the Hkobjecttype class

Hkquantity

Represents the number of one data unit

Hkquery

Predicate Object

Hkanchoredobjectquery

Anchor Query

Hkcorrelationquery

Compound data Query

Hkobserverquery

Viewer Query

Hksamplequery

Sample Query

Hksourcequery

Data source Query

Hkstatisticscollectionquery

Statistics Collection Query

Hkstatisticsquery

Statistics Query

Hksource

Data source Object

Hkstatistics

Statistics objects

Hkstatisticscollection

Statistics Collection Objects

Hkunit

Basic unit of data

Hkworkoutevent

Workout time

1.2.2 Health App

The Health app samples a new summary of the charts, showing the user's health and fitness data at a glance, 1.5. Apple has provided developers with a new tool called HealthKit, which allows all of the incredible health and fitness apps to work together to make the user's health more powerful. And that may just be the first step in a healthy revolution.

Figure 1.5 Chart Summary

Heart rate, calories burned, blood sugar, cholesterol, and so on, the new Health app brings this data together, and 1.6 clicks to see it so users can see the current health profile clearly.

The Health app sets every detail and what data is shared with each health and fitness app is entirely up to the user, as shown in 1.7. The Health app can also create a first aid card, shown in 1.8.

Figure 1.6 Data collection Figure 1.7 Setup details Figure 1.8 First Aid card

1.2.3 Create app ID special needs

Developer-created HealthKit applications require developers to request and download development certificates to implement some of the features associated with the health application. One thing we need to be aware of when creating an app ID is that in app services, you need to select HealthKit so that you can activate the HealthKit service, as shown in 1.9.

Figure 1.9 App ID

This article is selected from: HealthKit Development Quick Start Tutorial University PA information, published in the blog Park, reproduced please indicate the source, respect the technology respect the IT person!

HealthKit Development Quick Start Tutorial HealthKit framework System Create health AppID

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.