Skip to content

HealthKit watchOS xcode9 beta1

Vincent Dondain edited this page Jun 5, 2017 · 1 revision

#HealthKit.framework

diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h	2017-05-25 08:27:19.000000000 -0400
@@ -15,7 +15,7 @@
  @class         HKActivitySummary
  @abstract      An object that represents a summary of a user's activity for a given day.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_3, 2_2)
+HK_EXTERN API_AVAILABLE(ios(9.3), watchos(2.2))
 @interface HKActivitySummary : NSObject <NSSecureCoding, NSCopying>
 
 /**
@@ -72,7 +72,7 @@
 @end
 
 // Predicate Key Paths
-HK_EXTERN NSString * const HKPredicateKeyPathDateComponents HK_AVAILABLE_IOS_WATCHOS(9_3, 2_2);
+HK_EXTERN NSString * const HKPredicateKeyPathDateComponents API_AVAILABLE(ios(9.3), watchos(2.2));
 
 NS_ASSUME_NONNULL_END
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -7,12 +7,11 @@
 
 #import <HealthKit/HKQuery.h>
 
-@class HKQueryAnchor;
 @class HKActivitySummary;
 
 NS_ASSUME_NONNULL_BEGIN
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_3, 2_2)
+HK_EXTERN API_AVAILABLE(ios(9.3), watchos(2.2))
 @interface HKActivitySummaryQuery : HKQuery
 
 /**
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -17,7 +17,7 @@
  @class         HKQueryAnchor
  @discussion    This object encapsulates the state of an HKAnchoredObjectQuery
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(9.0), watchos(2.0))
 @interface HKQueryAnchor : NSObject <NSSecureCoding, NSCopying>
 
 /*!
@@ -35,7 +35,7 @@
  @discussion    This query can be used by an application to find out about new or deleted samples in the HealthKit
                 database.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKAnchoredObjectQuery : HKQuery
 
 /*!
@@ -44,7 +44,7 @@
  @discussion    This property may not be modified once the query has been executed.  It may only be set if the query has
                 no limit.
  */
-@property (nonatomic, copy, nullable) void(^updateHandler)(HKAnchoredObjectQuery *query, NSArray<__kindof HKSample *> * _Nullable addedObjects, NSArray<HKDeletedObject *> * _Nullable deletedObjects, HKQueryAnchor * _Nullable newAnchor, NSError * _Nullable error) HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+@property (nonatomic, copy, nullable) void(^updateHandler)(HKAnchoredObjectQuery *query, NSArray<__kindof HKSample *> * _Nullable addedObjects, NSArray<HKDeletedObject *> * _Nullable deletedObjects, HKQueryAnchor * _Nullable newAnchor, NSError * _Nullable error) API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        initWithType:predicate:anchor:limit:resultsHandler:
@@ -66,13 +66,13 @@
                    predicate:(nullable NSPredicate *)predicate
                       anchor:(nullable HKQueryAnchor *)anchor
                        limit:(NSUInteger)limit
-              resultsHandler:(void(^)(HKAnchoredObjectQuery *query, NSArray<__kindof HKSample *> * _Nullable sampleObjects, NSArray<HKDeletedObject *> * _Nullable deletedObjects, HKQueryAnchor * _Nullable newAnchor, NSError * _Nullable error))handler HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+              resultsHandler:(void(^)(HKAnchoredObjectQuery *query, NSArray<__kindof HKSample *> * _Nullable sampleObjects, NSArray<HKDeletedObject *> * _Nullable deletedObjects, HKQueryAnchor * _Nullable newAnchor, NSError * _Nullable error))handler API_AVAILABLE(ios(9.0), watchos(2.0));
 
 - (instancetype)initWithType:(HKSampleType *)type
                    predicate:(nullable NSPredicate *)predicate
                       anchor:(NSUInteger)anchor
                        limit:(NSUInteger)limit
-           completionHandler:(void(^)(HKAnchoredObjectQuery *query, NSArray<__kindof HKSample *> * __nullable results, NSUInteger newAnchor, NSError * __nullable error))handler NS_DEPRECATED_IOS(8_0, 9_0, "Use initWithType:predicate:anchor:limit:resultsHandler:");
+           completionHandler:(void(^)(HKAnchoredObjectQuery *query, NSArray<__kindof HKSample *> * __nullable results, NSUInteger newAnchor, NSError * __nullable error))handler API_DEPRECATED_WITH_REPLACEMENT("initWithType:predicate:anchor:limit:resultsHandler:", ios(8.0, 9.0));
 
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h	2016-10-10 19:45:07.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h	2017-05-25 06:21:06.000000000 -0400
@@ -18,7 +18,7 @@
  @class         HKCDADocumentSample
  @abstract      A sample object representing a CDA document.
  */
-HK_CLASS_AVAILABLE_IOS_ONLY(10_0)
+HK_EXTERN API_AVAILABLE(ios(10.0))
 @interface HKCDADocumentSample : HKDocumentSample
 
 /*!
@@ -54,6 +54,7 @@
 
 @end
 
+HK_EXTERN API_AVAILABLE(ios(10.0))
 @interface HKCDADocument : NSObject
 
 /*!
@@ -96,22 +97,22 @@
 /*!
  @constant  HKPredicateKeyPathCDATitle
  */
-HK_EXTERN NSString * const HKPredicateKeyPathCDATitle HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKPredicateKeyPathCDATitle API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant  HKPredicateKeyPathCDAPatientName
  */
-HK_EXTERN NSString * const HKPredicateKeyPathCDAPatientName HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKPredicateKeyPathCDAPatientName API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant  HKPredicateKeyPathCDAAuthorName
  */
-HK_EXTERN NSString * const HKPredicateKeyPathCDAAuthorName HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKPredicateKeyPathCDAAuthorName API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant  HKPredicateKeyPathCDACustodianName
  */
-HK_EXTERN NSString * const HKPredicateKeyPathCDACustodianName HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKPredicateKeyPathCDACustodianName API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKDetailedCDAValidationErrorKey
@@ -119,6 +120,6 @@
                 CDADocumentSampleWithData:startDate:endDate:device:metadata:validationError: to obtain a detailed
                 description of the validation errors encountered when creating a CDA document.
  */
-HK_EXTERN NSString * const HKDetailedCDAValidationErrorKey HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKDetailedCDAValidationErrorKey API_AVAILABLE(ios(10.0), watchos(3.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h	2017-05-25 08:27:19.000000000 -0400
@@ -17,7 +17,7 @@
  @abstract   An HKObject subclass representing an category measurement
  @discussion Category samples are samples that can be categorized into an enum of concrete values
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKCategorySample : HKSample
 
 @property (readonly, strong) HKCategoryType *categoryType;
@@ -76,13 +76,13 @@
                              startDate:(NSDate *)startDate
                                endDate:(NSDate *)endDate
                                 device:(nullable HKDevice *)device
-                              metadata:(nullable NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+                              metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(9.0), watchos(2.0));
 
 @end
 
 /*!
  @constant     HKPredicateKeyPathCategoryValue
  */
-HK_EXTERN NSString * const HKPredicateKeyPathCategoryValue HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKPredicateKeyPathCategoryValue API_AVAILABLE(ios(8.0), watchos(2.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h	2017-05-25 08:27:19.000000000 -0400
@@ -13,7 +13,7 @@
  @class     HKBiologicalSexObject
  @abstract  A wrapper object for HKBiologicalSex enumeration.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKBiologicalSexObject : NSObject <NSCopying, NSSecureCoding>
 
 @property (readonly) HKBiologicalSex biologicalSex;
@@ -24,7 +24,7 @@
  @class     HKBloodTypeObject
  @abstract  A wrapper object for HKBloodType enumeration.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKBloodTypeObject : NSObject <NSCopying, NSSecureCoding>
 
 @property (readonly) HKBloodType bloodType;
@@ -35,7 +35,7 @@
  @class     HKFitzpatrickSkinTypeObject
  @abstract  A wrapper object for HKFitzpatrickSkinType enumeration.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(9.0), watchos(2.0))
 @interface HKFitzpatrickSkinTypeObject : NSObject <NSCopying, NSSecureCoding>
 
 @property (readonly) HKFitzpatrickSkinType skinType;
@@ -46,7 +46,7 @@
  @class     HKWheelchairUseObject
  @abstract  A wrapper object for HKWheelchairUse enumeration.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(10_0, 3_0)
+HK_EXTERN API_AVAILABLE(ios(10.0), watchos(3.0))
 @interface HKWheelchairUseObject : NSObject <NSCopying, NSSecureCoding>
 
 @property (readonly) HKWheelchairUse wheelchairUse;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h	2017-05-25 08:27:19.000000000 -0400
@@ -21,7 +21,7 @@
                 For example, systolic and diastolic blood pressure readings are typically presented together so these
                 readings should be saved with a correlation of type blood pressure.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKCorrelation : HKSample
 
 @property (readonly) HKCorrelationType *correlationType;
@@ -68,7 +68,7 @@
                             endDate:(NSDate *)endDate
                             objects:(NSSet<HKSample *> *)objects
                              device:(nullable HKDevice *)device
-                           metadata:(nullable NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+                           metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method    objectsForType:
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -19,7 +19,7 @@
                 accepts a predicate to filter HKCorrelations and a dictionary of predicates to filter the
                 correlated samples.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKCorrelationQuery : HKQuery
 
 @property (readonly, copy) HKCorrelationType *correlationType;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h	2017-05-25 08:27:19.000000000 -0400
@@ -15,17 +15,7 @@
 #define HK_EXTERN extern "C" __attribute__((visibility("default")))
 #endif
 
-#define HK_AVAILABLE_IOS_WATCHOS(_iOSIntro, _watchOSIntro)    NS_AVAILABLE_IOS(_iOSIntro) __WATCHOS_AVAILABLE(_watchOSIntro)
-#define HK_AVAILABLE_IOS_ONLY(_iOSIntro)    NS_AVAILABLE_IOS(_iOSIntro) __WATCHOS_UNAVAILABLE
-#define HK_AVAILABLE_WATCHOS_ONLY(_watchOSIntro)    __WATCHOS_AVAILABLE(_watchOSIntro) __IOS_UNAVAILABLE
-
-#define HK_CLASS_AVAILABLE_IOS_ONLY(_iOSIntro)    NS_CLASS_AVAILABLE_IOS(_iOSIntro) __WATCHOS_PROHIBITED
-#define HK_CLASS_AVAILABLE_WATCHOS_ONLY(_watchOSIntro)    HK_EXTERN HK_AVAILABLE_WATCHOS_ONLY(_watchOSIntro)
-#define HK_CLASS_AVAILABLE_IOS_WATCHOS(_iOSIntro, _watchOSIntro)    NS_CLASS_AVAILABLE_IOS(_iOSIntro) __WATCHOS_AVAILABLE(_watchOSIntro)
-
-#define HK_ENUM_AVAILABLE_IOS_WATCHOS(_iOSIntro, _watchOSIntro)    NS_ENUM_AVAILABLE_IOS(_iOSIntro) __WATCHOS_AVAILABLE(_watchOSIntro)
-
-HK_EXTERN NSString * const HKErrorDomain HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKErrorDomain API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @enum      HKErrorCode
@@ -51,9 +41,9 @@
     HKErrorAuthorizationNotDetermined,
     HKErrorDatabaseInaccessible,
     HKErrorUserCanceled,
-    HKErrorAnotherWorkoutSessionStarted HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0),
-    HKErrorUserExitedWorkoutSession     HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0),
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+    HKErrorAnotherWorkoutSessionStarted     API_AVAILABLE(ios(9.0), watchos(2.0)),
+    HKErrorUserExitedWorkoutSession         API_AVAILABLE(ios(9.0), watchos(2.0)),
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @enum      HKUpdateFrequency
@@ -63,7 +53,7 @@
     HKUpdateFrequencyHourly,
     HKUpdateFrequencyDaily,
     HKUpdateFrequencyWeekly,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @enum      HKAuthorizationStatus
@@ -79,7 +69,7 @@
     HKAuthorizationStatusNotDetermined = 0,
     HKAuthorizationStatusSharingDenied,
     HKAuthorizationStatusSharingAuthorized,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @enum       HKBiologicalSex
@@ -89,8 +79,8 @@
     HKBiologicalSexNotSet = 0,
     HKBiologicalSexFemale,
     HKBiologicalSexMale,
-    HKBiologicalSexOther HK_ENUM_AVAILABLE_IOS_WATCHOS(8_2, 2_0),
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+    HKBiologicalSexOther API_AVAILABLE(ios(8.2), watchos(2.0)),
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @enum       HKBloodType
@@ -106,7 +96,7 @@
     HKBloodTypeABNegative,
     HKBloodTypeOPositive,
     HKBloodTypeONegative,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @enum          HKCategoryValueSleepAnalysis
@@ -121,8 +111,8 @@
 typedef NS_ENUM(NSInteger, HKCategoryValueSleepAnalysis) {
     HKCategoryValueSleepAnalysisInBed,
     HKCategoryValueSleepAnalysisAsleep,
-    HKCategoryValueSleepAnalysisAwake HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+    HKCategoryValueSleepAnalysisAwake API_AVAILABLE(ios(10.0), watchos(3.0)),
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 
 /*!
@@ -137,7 +127,7 @@
 typedef NS_ENUM(NSInteger, HKCategoryValueAppleStandHour) {
     HKCategoryValueAppleStandHourStood = 0,
     HKCategoryValueAppleStandHourIdle,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+} API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @enum          HKFitzpatrickSkinType
@@ -160,7 +150,7 @@
     HKFitzpatrickSkinTypeIV,
     HKFitzpatrickSkinTypeV,
     HKFitzpatrickSkinTypeVI,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+} API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @enum          HKWheelchairUse
@@ -173,7 +163,7 @@
     HKWheelchairUseNotSet = 0,
     HKWheelchairUseNo,
     HKWheelchairUseYes,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+} API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @enum          HKCategoryValueCervicalMucusQuality
@@ -186,7 +176,7 @@
     HKCategoryValueCervicalMucusQualityCreamy,
     HKCategoryValueCervicalMucusQualityWatery,
     HKCategoryValueCervicalMucusQualityEggWhite,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+} API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @enum          HKCategoryValueOvulationTestResult
@@ -198,7 +188,7 @@
     HKCategoryValueOvulationTestResultNegative = 1,
     HKCategoryValueOvulationTestResultPositive,
     HKCategoryValueOvulationTestResultIndeterminate,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+} API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @enum          HKCategoryValueMenstrualFlow
@@ -209,7 +199,7 @@
     HKCategoryValueMenstrualFlowLight,
     HKCategoryValueMenstrualFlowMedium,
     HKCategoryValueMenstrualFlowHeavy
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+} API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @enum          HKCategoryValue
@@ -217,6 +207,6 @@
  */
 typedef NS_ENUM(NSInteger, HKCategoryValue) {
     HKCategoryValueNotApplicable = 0,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+} API_AVAILABLE(ios(9.0), watchos(2.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h	2017-05-25 08:27:19.000000000 -0400
@@ -13,7 +13,7 @@
  @class         HKDeletedObject
  @abstract      A class representing an HKObject that was deleted from the HealtKit database.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(9.0), watchos(2.0))
 @interface HKDeletedObject : NSObject <NSSecureCoding>
 
 /*!
@@ -22,6 +22,14 @@
  */
 @property (readonly, strong) NSUUID *UUID;
 
+/*!
+ @property      metadata
+ @abstract      Extra information describing properties of the receiver.
+ @discussion    Metadata retained from the deleted HKObject.
+                Available keys: HKMetadataKeySyncIdentifier, HKMetadataKeySyncVersion
+ */
+@property (readonly, copy, nullable) NSDictionary<NSString *, id> *metadata API_AVAILABLE(ios(11.0), watchos(4.0));
+
 - (instancetype)init NS_UNAVAILABLE;
 
 @end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h	2016-09-29 00:39:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h	2017-05-21 00:17:43.000000000 -0400
@@ -14,60 +14,60 @@
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a device name.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyName HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyName API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeyManufacturer
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a device manufacturer.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyManufacturer HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyManufacturer API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeyModel
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a device model.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyModel HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyModel API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeyHardwareVersion
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a hardware version.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyHardwareVersion HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyHardwareVersion API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeyFirmwareVersion
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a firmware version.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyFirmwareVersion HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyFirmwareVersion API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeySoftwareVersion
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a software version.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeySoftwareVersion HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeySoftwareVersion API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeyLocalIdentifier
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a local identifier.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyLocalIdentifier HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyLocalIdentifier API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKDevicePropertyKeyUDIDeviceIdentifier
  @abstract      Used with predicateForObjectsWithDeviceProperty to specify a UDI device identifier.
  @discussion    The expected value type is an NSString.
  */
-HK_EXTERN NSString * const HKDevicePropertyKeyUDIDeviceIdentifier HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKDevicePropertyKeyUDIDeviceIdentifier API_AVAILABLE(ios(9.0), watchos(2.0));
 
 
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(9.0), watchos(2.0))
 @interface HKDevice : NSObject <NSSecureCoding, NSCopying>
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -17,7 +17,7 @@
  @abstract      A concrete subclass of HKQuery that provides an interface to retrieve documents from the Health store.
  
  */
-HK_CLASS_AVAILABLE_IOS_ONLY(10_0)
+HK_EXTERN API_AVAILABLE(ios(10.0))
 @interface HKDocumentQuery : HKQuery
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h	2017-05-25 08:27:19.000000000 -0400
@@ -15,7 +15,7 @@
  @class         HKDocumentSample
  @abstract      An abstract class representing a health document.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(10_0, 3_0)
+HK_EXTERN API_AVAILABLE(ios(10.0), watchos(3.0))
 @interface HKDocumentSample : HKSample
 
 @property (readonly, strong) HKDocumentType *documentType;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h	2016-09-29 01:02:13.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h	2017-05-20 23:54:27.000000000 -0400
@@ -29,7 +29,7 @@
  @class         HKHealthStore
  @abstract      The HKHealthStore class provides an interface for accessing and storing the user's health data.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKHealthStore : NSObject
 
 /*!
@@ -80,7 +80,7 @@
                 the user, if necessary, completed successfully and was not cancelled by the user.  It does NOT indicate
                 whether the application was granted authorization.
  */
-- (void)handleAuthorizationForExtensionWithCompletion:(void (^)(BOOL success, NSError * _Nullable error))completion HK_AVAILABLE_IOS_ONLY(9_0) NS_EXTENSION_UNAVAILABLE("Not available to extensions") ;
+- (void)handleAuthorizationForExtensionWithCompletion:(void (^)(BOOL success, NSError * _Nullable error))completion API_AVAILABLE(ios(9.0)) NS_EXTENSION_UNAVAILABLE("Not available to extensions");
 
 /*!
  @method        earliestPermittedSampleDate
@@ -88,7 +88,7 @@
  @discussion    On some platforms, only samples with end dates newer than the value returned by earliestPermittedSampleDate
                 may be saved or retrieved.
  */
-- (NSDate *)earliestPermittedSampleDate HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+- (NSDate *)earliestPermittedSampleDate API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        saveObject:withCompletion:
@@ -128,7 +128,7 @@
  @discussion    An application may only delete objects that it previously saved.  This operation is performed
                 asynchronously and the completion will be executed on an arbitrary background queue.
  */
-- (void)deleteObjects:(NSArray<HKObject *> *)objects withCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+- (void)deleteObjects:(NSArray<HKObject *> *)objects withCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        deleteObjectsOfType:predicate:withCompletion:
@@ -136,7 +136,7 @@
  @discussion    An application may only delete objects that it previously saved.  This operation is performed
                 asynchronously and the completion will be executed on an arbitrary background queue.
  */
-- (void)deleteObjectsOfType:(HKObjectType *)objectType predicate:(NSPredicate *)predicate withCompletion:(void(^)(BOOL success, NSUInteger deletedObjectCount, NSError * _Nullable error))completion HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+- (void)deleteObjectsOfType:(HKObjectType *)objectType predicate:(NSPredicate *)predicate withCompletion:(void(^)(BOOL success, NSUInteger deletedObjectCount, NSError * _Nullable error))completion API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        executeQuery:
@@ -173,9 +173,9 @@
 - (void)splitTotalEnergy:(HKQuantity *)totalEnergy
                startDate:(NSDate *)startDate
                  endDate:(NSDate *)endDate
-          resultsHandler:(void(^)(HKQuantity * _Nullable restingEnergy, HKQuantity * _Nullable activeEnergy, NSError * _Nullable error))resultsHandler HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+          resultsHandler:(void(^)(HKQuantity * _Nullable restingEnergy, HKQuantity * _Nullable activeEnergy, NSError * _Nullable error))resultsHandler API_AVAILABLE(ios(9.0), watchos(2.0));
 
-- (nullable NSDate *)dateOfBirthWithError:(NSError **)error NS_DEPRECATED_IOS(8_0, 10_0, "Use dateOfBirthComponentsWithError:") __WATCHOS_DEPRECATED(2_0, 3_0, "Use dateOfBirthComponentsWithError:");
+- (nullable NSDate *)dateOfBirthWithError:(NSError **)error API_DEPRECATED_WITH_REPLACEMENT("dateOfBirthComponentsWithError:", ios(8.0, 10.0), watchos(2.0, 3.0));
 
 /*!
  @method        dateOfBirthComponentsWithError:
@@ -183,7 +183,7 @@
  @discussion    Before calling this method, the application should request authorization to access objects with the
                 HKCharacteristicType identified by HKCharacteristicTypeIdentifierDateOfBirth.
  */
-- (nullable NSDateComponents *)dateOfBirthComponentsWithError:(NSError **)error HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+- (nullable NSDateComponents *)dateOfBirthComponentsWithError:(NSError **)error API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @method        biologicalSexWithError:
@@ -207,7 +207,7 @@
  @discussion    Before calling this method, the application should request authorization to access objects with the
                 HKCharacteristicType identified by HKCharacteristicTypeIdentifierFitzpatrickSkinType.
  */
-- (nullable HKFitzpatrickSkinTypeObject *)fitzpatrickSkinTypeWithError:(NSError **)error HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+- (nullable HKFitzpatrickSkinTypeObject *)fitzpatrickSkinTypeWithError:(NSError **)error API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        wheelchairUseWithError:
@@ -215,7 +215,7 @@
  @discussion    Before calling this method, the application should request authorization to access objects with the
                 HKCharacteristicType identified by HKCharacteristicTypeIdentifierWheelchairUse.
  */
-- (nullable HKWheelchairUseObject *)wheelchairUseWithError:(NSError **)error HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+- (nullable HKWheelchairUseObject *)wheelchairUseWithError:(NSError **)error API_AVAILABLE(ios(10.0), watchos(3.0));
 
 @end
 
@@ -238,7 +238,7 @@
  @discussion    This method will asynchronously begin a workout session. The methods on the session's delegate will be 
                 called when the session has successfully started or fails to start.
  */
-- (void)startWorkoutSession:(HKWorkoutSession *)workoutSession HK_AVAILABLE_WATCHOS_ONLY(2_0);
+- (void)startWorkoutSession:(HKWorkoutSession *)workoutSession API_AVAILABLE(watchos(2.0));
 
 /*!
  @method        endWorkoutSession:
@@ -247,7 +247,7 @@
                 transition to HKWorkoutSessionStateEnded. Once a workout session is ended, it cannot be reused to start
                 a new workout session.
  */
-- (void)endWorkoutSession:(HKWorkoutSession *)workoutSession HK_AVAILABLE_WATCHOS_ONLY(2_0);
+- (void)endWorkoutSession:(HKWorkoutSession *)workoutSession API_AVAILABLE(watchos(2.0));
 
 /*!
  @method        pauseWorkoutSession:
@@ -256,7 +256,7 @@
                 will transition to HKWorkoutSessionStatePaused. An HKWorkoutEventTypePause will be generated and
                 delivered to the workout session's delegate.
  */
-- (void)pauseWorkoutSession:(HKWorkoutSession *)workoutSession HK_AVAILABLE_WATCHOS_ONLY(3_0);
+- (void)pauseWorkoutSession:(HKWorkoutSession *)workoutSession API_AVAILABLE(watchos(3.0));
 
 /*!
  @method        resumeWorkoutSession:
@@ -265,7 +265,7 @@
                 will transition to HKWorkoutSessionStateRunning. An HKWorkoutEventTypeResume will be generated and
                 delivered to the workout session's delegate.
  */
-- (void)resumeWorkoutSession:(HKWorkoutSession *)workoutSession HK_AVAILABLE_WATCHOS_ONLY(3_0);
+- (void)resumeWorkoutSession:(HKWorkoutSession *)workoutSession API_AVAILABLE(watchos(3.0));
 
 /*!
  @method        startWatchAppWithWorkoutConfiguration:completion:
@@ -275,7 +275,7 @@
                 protocol will be called with the HKWorkoutConfiguration as a parameter. The receiving Watch app can use
                 this configuration object to create an HKWorkoutSession and start it with -startWorkoutSession:.
  */
-- (void)startWatchAppWithWorkoutConfiguration:(HKWorkoutConfiguration *)workoutConfiguration completion:(void (^)(BOOL success, NSError * _Nullable error))completion HK_AVAILABLE_IOS_ONLY(10_0);
+- (void)startWatchAppWithWorkoutConfiguration:(HKWorkoutConfiguration *)workoutConfiguration completion:(void (^)(BOOL success, NSError * _Nullable error))completion API_AVAILABLE(ios(10.0));
 
 @end
 
@@ -291,23 +291,23 @@
                 HKQuantityTypeIdentifierStepCount) have a minimum frequency of HKUpdateFrequencyHourly. This is enforced
                 transparently to the caller.
  */
-- (void)enableBackgroundDeliveryForType:(HKObjectType *)type frequency:(HKUpdateFrequency)frequency withCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion __WATCHOS_UNAVAILABLE;
+- (void)enableBackgroundDeliveryForType:(HKObjectType *)type frequency:(HKUpdateFrequency)frequency withCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion __WATCHOS_PROHIBITED;
 
-- (void)disableBackgroundDeliveryForType:(HKObjectType *)type withCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion __WATCHOS_UNAVAILABLE;
+- (void)disableBackgroundDeliveryForType:(HKObjectType *)type withCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion __WATCHOS_PROHIBITED;
 
-- (void)disableAllBackgroundDeliveryWithCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion __WATCHOS_UNAVAILABLE;
+- (void)disableAllBackgroundDeliveryWithCompletion:(void(^)(BOOL success, NSError * _Nullable error))completion __WATCHOS_PROHIBITED;
 
 @end
 
 /*!
  @constant      HKUserPreferencesDidChangeNotification
  @abstract      A notification posted every time the user updates their preferred units.
- @discussion    Each HKHealthStore posts a HKUserPreferencesDidChangeNotification notification when the preferred unit 
-                for a HKQuantityType is changed by the user. To guarantee your listener will only receive a single 
+ @discussion    Each HKHealthStore posts a HKUserPreferencesDidChangeNotification notification when the preferred unit
+                for a HKQuantityType is changed by the user. To guarantee your listener will only receive a single
                 notification when this occurs, it is necessary to provide an HKHealthStore instance for the object
                 parameter of NSNotificationCenter's addObserver methods.
  */
-HK_EXTERN NSString * const HKUserPreferencesDidChangeNotification HK_AVAILABLE_IOS_WATCHOS(8_2, 2_0);
+HK_EXTERN NSString * const HKUserPreferencesDidChangeNotification API_AVAILABLE(ios(8.2), watchos(2.0));
 
 @interface HKHealthStore (HKUserPreferences)
 
@@ -325,7 +325,7 @@
  
                 The returned dictionary will map HKQuantityType to HKUnit.
  */
-- (void)preferredUnitsForQuantityTypes:(NSSet<HKQuantityType *> *)quantityTypes completion:(void(^)(NSDictionary<HKQuantityType*, HKUnit *> *preferredUnits, NSError * _Nullable error))completion HK_AVAILABLE_IOS_WATCHOS(8_2, 2_0);
+- (void)preferredUnitsForQuantityTypes:(NSSet<HKQuantityType *> *)quantityTypes completion:(void(^)(NSDictionary<HKQuantityType *, HKUnit *> *preferredUnits, NSError * _Nullable error))completion API_AVAILABLE(ios(8.2), watchos(2.0));
 
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h	2017-05-20 23:54:27.000000000 -0400
@@ -14,14 +14,14 @@
  @abstract      Represents the serial number of the device that created the HKObject.
  @discussion    The expected value type is NSString.
  */
-HK_EXTERN NSString * const HKMetadataKeyDeviceSerialNumber HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyDeviceSerialNumber API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyBodyTemperatureSensorLocation
  @abstract      Represents the location where a particular body temperature reading was taken.
  @discussion    The expected value type is an NSNumber containing a HKBodyTemperatureSensorLocation value.
  */
-HK_EXTERN NSString * const HKMetadataKeyBodyTemperatureSensorLocation HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyBodyTemperatureSensorLocation API_AVAILABLE(ios(8.0), watchos(2.0));
 
 typedef NS_ENUM(NSInteger, HKBodyTemperatureSensorLocation) {
     HKBodyTemperatureSensorLocationOther = 0,
@@ -36,14 +36,14 @@
     HKBodyTemperatureSensorLocationEarDrum,
     HKBodyTemperatureSensorLocationTemporalArtery,
     HKBodyTemperatureSensorLocationForehead,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyHeartRateSensorLocation
  @abstract      Represents the location where a particular heart rate reading was taken.
  @discussion    The expected value type is an NSNumber containing a HKHeartRateSensorLocation value.
  */
-HK_EXTERN NSString * const HKMetadataKeyHeartRateSensorLocation HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyHeartRateSensorLocation API_AVAILABLE(ios(8.0), watchos(2.0));
 
 typedef NS_ENUM(NSInteger, HKHeartRateSensorLocation) {
     HKHeartRateSensorLocationOther = 0,
@@ -53,7 +53,7 @@
     HKHeartRateSensorLocationHand,
     HKHeartRateSensorLocationEarLobe,
     HKHeartRateSensorLocationFoot,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyFoodType
@@ -61,7 +61,7 @@
  @discussion    This should be a short string representing the type of food, such as 'Banana'. The expected value type
                 is NSString.
  */
-HK_EXTERN NSString * const HKMetadataKeyFoodType HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyFoodType API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyUDIDeviceIdentifier
@@ -71,7 +71,7 @@
  
                 ** Note that the use of this key is now discouraged in favor of the HKDevice class.
  */
-HK_EXTERN NSString * const HKMetadataKeyUDIDeviceIdentifier HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyUDIDeviceIdentifier API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyUDIProductionIdentifier
@@ -82,7 +82,7 @@
                 needed.
                 The expected value type is NSString.
  */
-HK_EXTERN NSString * const HKMetadataKeyUDIProductionIdentifier HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyUDIProductionIdentifier API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyDigitalSignature
@@ -95,21 +95,43 @@
                 Standard Elliptic Curve P-256. See documentation for details.
 
  */
-HK_EXTERN NSString * const HKMetadataKeyDigitalSignature HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyDigitalSignature API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyExternalUUID
- @abstract      Represents a unique identifier for an HKObject that is set by its source. 
+ @abstract      Represents a unique identifier for an HKObject that is set by its source.
+                Uniqueness of objects with the same value of this key is not enforced by HealthKit.
  @discussion    The expected value type is NSString.
  */
-HK_EXTERN NSString * const HKMetadataKeyExternalUUID HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyExternalUUID API_AVAILABLE(ios(8.0), watchos(2.0));
+
+/*!
+ @constant      HKMetadataKeySyncIdentifier
+ @abstract      Represents an identifier for an HKObject that is set by its source and is used by HealthKit to uniquely
+                identify an object.
+ @discussion    Saving a HKObject with a HKMetadataKeySyncIdentifier will replace an existing HKObject with the
+                same HKMetadataKeySyncIdentifier value if the new HKObject has a greater HKMetadataKeySyncVersion.
+                The new sample will be added to all HKWorkouts or HKCorrelations containing the replaced sample.
+                HKMetadataKeySyncVersion must be provided if HKMetadataKeySyncIdentifier is provided.
+                The expected value type is NSString.
+ */
+HK_EXTERN NSString * const HKMetadataKeySyncIdentifier API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @constant      HKMetadataKeySyncVersion
+ @abstract      Represents the version of the HKObject that is set by its source and is used by HealthKit to identify an
+                object's version.
+ @discussion    HKMetadataKeySyncVersion may not be provided if HKMetadataKeySyncIdentifier is not provided.
+                The expected value type is NSNumber.
+ */
+HK_EXTERN NSString * const HKMetadataKeySyncVersion API_AVAILABLE(ios(11.0), watchos(4.0));
 
 /*!
  @constant      HKMetadataKeyTimeZone
  @abstract      Represents the time zone that the user was in when the HKObject was created.
  @discussion    The expected value type is an NSString compatible with NSTimeZone's +timeZoneWithName:.
  */
-HK_EXTERN NSString * const HKMetadataKeyTimeZone HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyTimeZone API_AVAILABLE(ios(8.0), watchos(2.0));
 
 
 /*!
@@ -119,7 +141,7 @@
  
                 ** Note that the use of this key is now discouraged in favor of the HKDevice class.
  */
-HK_EXTERN NSString * const HKMetadataKeyDeviceName HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyDeviceName API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyDeviceManufacturerName
@@ -128,63 +150,63 @@
  
                 ** Note that the use of this key is now discouraged in favor of the HKDevice class.
  */
-HK_EXTERN NSString * const HKMetadataKeyDeviceManufacturerName HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyDeviceManufacturerName API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyWasTakenInLab
  @abstract      Represents whether or not the reading was taken in a lab.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeyWasTakenInLab HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyWasTakenInLab API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyReferenceRangeLowerLimit
  @abstract      Represents the lower limit of the reference range for a lab result.
  @discussion    The expected value type is an NSNumber.
  */
-HK_EXTERN NSString * const HKMetadataKeyReferenceRangeLowerLimit HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyReferenceRangeLowerLimit API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyReferenceRangeUpperLimit
  @abstract      Represents the upper limit of the reference range for a lab result.
  @discussion    The expected value type is an NSNumber.
  */
-HK_EXTERN NSString * const HKMetadataKeyReferenceRangeUpperLimit HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyReferenceRangeUpperLimit API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyWasUserEntered
  @abstract      Represents whether or not the reading was entered by the user.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeyWasUserEntered HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyWasUserEntered API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyWorkoutBrandName
  @abstract      Represents the brand name of a particular workout.
  @discussion    The expected value type is NSString.
  */
-HK_EXTERN NSString * const HKMetadataKeyWorkoutBrandName HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyWorkoutBrandName API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyGroupFitness
  @abstract      Represents whether or not a workout was performed as part of a group fitness class.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeyGroupFitness HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyGroupFitness API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyIndoorWorkout
  @abstract      Represents whether or not a workout was performed indoors as opposed to outdoors.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeyIndoorWorkout HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyIndoorWorkout API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyCoachedWorkout
  @abstract      Represents whether or not a workout was performed with a coach or personal trainer.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeyCoachedWorkout HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyCoachedWorkout API_AVAILABLE(ios(8.0), watchos(2.0));
 
 typedef NS_ENUM(NSInteger, HKWeatherCondition) {
     HKWeatherConditionNone = 0,
@@ -215,7 +237,7 @@
     HKWeatherConditionTropicalStorm,
     HKWeatherConditionHurricane,
     HKWeatherConditionTornado,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+} API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKMetadataKeyWeatherCondition
@@ -223,7 +245,7 @@
  @discussion    The expected value type is an NSNumber containing an HKWeatherCondition value. This key may be set on an
                 HKWorkout object to represent the overall weather condition during the workout.
  */
-HK_EXTERN NSString * const HKMetadataKeyWeatherCondition HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKMetadataKeyWeatherCondition API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKMetadataKeyWeatherTemperature
@@ -231,7 +253,7 @@
  @discussion    The expected value type is an HKQuantity expressed in a temperature unit. This key may be set on an
                 HKWorkout object to represent the overall temperature during the workout.
  */
-HK_EXTERN NSString * const HKMetadataKeyWeatherTemperature HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKMetadataKeyWeatherTemperature API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKMetadataKeyHumidity
@@ -239,7 +261,7 @@
  @discussion    The expected value type is an HKQuantity expressed in percent. This key may be set on an HKWorkout
                 object to represent the overall humidity during the workout.
  */
-HK_EXTERN NSString * const HKMetadataKeyWeatherHumidity HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKMetadataKeyWeatherHumidity API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKMetadataKeySexualActivityProtectionUsed
@@ -247,15 +269,15 @@
                 protection from STIs or protection from pregnancy.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeySexualActivityProtectionUsed HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeySexualActivityProtectionUsed API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyMenstrualCycleStart
  @abstract      Indicates whether or not the sample represents the start of a menstrual cycle. This is a required
-                metadata key for category samples of type HKCategorySampleMenstrualFlow.
+                metadata key for category samples of type HKCategoryTypeIdentifierMenstrualFlow.
  @discussion    The expected value type is an NSNumber containing a BOOL value.
  */
-HK_EXTERN NSString * const HKMetadataKeyMenstrualCycleStart HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKMetadataKeyMenstrualCycleStart API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @constant      HKMetadataKeyLapLength
@@ -263,7 +285,7 @@
  @discussion    The expected value type is an HKQuantity object compatible with a length unit. This key may be set on an
                 HKWorkout object to represent the length of a lap.
  */
-HK_EXTERN NSString * const HKMetadataKeyLapLength HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKMetadataKeyLapLength API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @enum          HKWorkoutSwimmingLocationType
@@ -274,7 +296,7 @@
     HKWorkoutSwimmingLocationTypeUnknown = 0,
     HKWorkoutSwimmingLocationTypePool,
     HKWorkoutSwimmingLocationTypeOpenWater,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+} API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKMetadataKeySwimmingLocationType
@@ -282,7 +304,7 @@
  @discussion    The expected value type is an NSNumber containing an HKWorkoutSwimmingLocationType value. This key may
                 be set on an HKWorkout object to represent the swimming location type.
  */
-HK_EXTERN NSString * const HKMetadataKeySwimmingLocationType HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKMetadataKeySwimmingLocationType API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @enum          HKSwimmingStrokeStyle
@@ -295,7 +317,7 @@
     HKSwimmingStrokeStyleBackstroke,
     HKSwimmingStrokeStyleBreaststroke,
     HKSwimmingStrokeStyleButterfly,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+} API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*!
  @constant      HKMetadataKeySwimmingStrokeStyle
@@ -304,6 +326,71 @@
                 an HKWorkoutEvent object with the type HKWorkoutEventTypeLap to represent the predominant style used
                 during the lap.
  */
-HK_EXTERN NSString * const HKMetadataKeySwimmingStrokeStyle HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKMetadataKeySwimmingStrokeStyle API_AVAILABLE(ios(10.0), watchos(3.0));
+
+/*!
+ @enum          HKInsulinDeliveryReason
+ @abstract      Represents a medical reason for the delivery of insulin
+ 
+ @constant      HKInsulinDeliveryReasonBasal  Delivery for the base metabolic needs of the individual, often
+                                              administered as a continuous rate from an insulin pump, or a periodic
+                                              injection of slow-acting insulin.
+ @constant      HKInsulinDeliveryReasonBolus  Delivery for the episodic needs of the individual, such as a meal or
+                                              glucose level correction.
+ */
+
+typedef NS_ENUM(NSInteger, HKInsulinDeliveryReason) {
+    HKInsulinDeliveryReasonBasal = 1,
+    HKInsulinDeliveryReasonBolus,
+} API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @constant      HKMetadataKeyInsulinDeliveryReason
+ @abstract      Represents the medical reason for the delivery of an insulin dose. This is a required metadata key for
+                samples of type HKQuantityTypeIdentifierInsulinDelivery.
+ @discussion    The expected value type is an NSNumber containing a HKInsulinDeliveryReason value.
+ */
+HK_EXTERN NSString * const HKMetadataKeyInsulinDeliveryReason API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @enum          HKBloodGlucoseMealTime
+ @abstract      Indicates how your blood glucose reading relates to a meal.
+
+ @constant      HKBloodGlucoseMealTimePreprandial   A glucose value measured at the time just before a meal.
+ @constant      HKBloodGlucoseMealTimePostprandial  A glucose value measured after a meal.
+ */
+typedef NS_ENUM(NSInteger, HKBloodGlucoseMealTime) {
+    HKBloodGlucoseMealTimePreprandial = 1,
+    HKBloodGlucoseMealTimePostprandial,
+} API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @constant      HKMetadataKeyBloodGlucoseMealTime
+ @abstract      Indicates the relative timing of a blood glucose reading to a meal.
+ @discussion    This timing, as well as other factors like meal composition, can be used by medical professionals to
+                determine the acceptable value range for a blood glucose reading. For use cases requiring the capture of
+                precise timing and composition information, developers should record additional dietary samples, such as
+                HKQuantityTypeIdentifierDietaryCarbohydrates. The expected value type is an NSNumber containing a
+                HKBloodGlucoseMealTime value.
+ */
+HK_EXTERN NSString * const HKMetadataKeyBloodGlucoseMealTime API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @enum          HKVO2MaxTestType
+ @abstract      Represents the test used to create a VO2 Max Sample.
+ */
+typedef NS_ENUM(NSInteger, HKVO2MaxTestType) {
+    HKVO2MaxTestTypeGradedExercise = 1, // A user is exerted to their physical limit to evaluate and measure actual VO2Max
+    HKVO2MaxTestTypePredictionSubMaxGradedExercise, // A specific test protocol is used to calculate and correlate a predicted VO2Max
+    HKVO2MaxTestTypePredictionNonExerciseEquation, // A non-exercise equation is used based on user metrics to calculate a predicted VO2Max
+    HKVO2MaxTestTypePredictionAppleWatch, // VO2Max prediction computed by Apple Watch
+} API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @constant      HKMetadataKeyVO2MaxTestType
+ @abstract      Represents the test used to create VO2 Max Sample
+ @discussion    The expected value type is an NSNumber containing a HKVO2MaxTestType value.
+ */
+HK_EXTERN NSString * const HKMetadataKeyVO2MaxTestType API_AVAILABLE(ios(11.0), watchos(4.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h	2017-05-25 08:27:19.000000000 -0400
@@ -14,7 +14,7 @@
 @class HKSourceRevision;
 @class HKDevice;
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKObject : NSObject <NSSecureCoding>
 
 /*!
@@ -23,19 +23,19 @@
  */
 @property (readonly, strong) NSUUID *UUID;
 
-@property (readonly, strong) HKSource *source NS_DEPRECATED_IOS(8_0, 9_0, "Use sourceRevision");
+@property (readonly, strong) HKSource *source API_DEPRECATED_WITH_REPLACEMENT("sourceRevision", ios(8.0, 9.0));
 
 /*!
  @property      sourceRevision
  @abstract      Represents the revision of the source responsible for saving the receiver.
  */
-@property (readonly, strong) HKSourceRevision *sourceRevision HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+@property (readonly, strong) HKSourceRevision *sourceRevision API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @property      device
  @abstract      Represents the device that generated the data of the receiver.
  */
-@property (readonly, strong, nullable) HKDevice *device HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+@property (readonly, strong, nullable) HKDevice *device API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @property      metadata
@@ -50,12 +50,12 @@
 @end
 
 // Predicate Key Paths
-HK_EXTERN NSString * const HKPredicateKeyPathUUID HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathSource HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathMetadata HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathCorrelation HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathWorkout HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathDevice HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathSourceRevision HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+HK_EXTERN NSString * const HKPredicateKeyPathUUID API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathSource API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathMetadata API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathCorrelation API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathWorkout API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathDevice API_AVAILABLE(ios(9.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathSourceRevision API_AVAILABLE(ios(9.0), watchos(2.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h	2017-05-25 08:27:19.000000000 -0400
@@ -2,11 +2,12 @@
 //  HKObjectType.h
 //  HealthKit
 //
-//  Copyright (c) 2013-2014 Apple Inc. All rights reserved.
+//  Copyright (c) 2013-2017 Apple Inc. All rights reserved.
 //
 
 #import <HealthKit/HKDefines.h>
 #import <HealthKit/HKTypeIdentifiers.h>
+#import <HealthKit/HKQuantityAggregationStyle.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -16,6 +17,7 @@
 @class HKCorrelationType;
 @class HKDocumentType;
 @class HKQuantityType;
+@class HKSeriesType;
 @class HKUnit;
 @class HKWorkoutType;
 
@@ -23,7 +25,7 @@
  @class         HKObjectType
  @abstract      An abstract class representing a type of object that can be stored by HealthKit.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKObjectType : NSObject <NSSecureCoding, NSCopying>
 
 /*!
@@ -39,9 +41,10 @@
 + (nullable HKCategoryType *)categoryTypeForIdentifier:(HKCategoryTypeIdentifier)identifier;
 + (nullable HKCharacteristicType *)characteristicTypeForIdentifier:(HKCharacteristicTypeIdentifier)identifier;
 + (nullable HKCorrelationType *)correlationTypeForIdentifier:(HKCorrelationTypeIdentifier)identifier;
-+ (nullable HKDocumentType *)documentTypeForIdentifier:(HKDocumentTypeIdentifier)identifier HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
++ (nullable HKDocumentType *)documentTypeForIdentifier:(HKDocumentTypeIdentifier)identifier API_AVAILABLE(ios(10.0), watchos(3.0));
++ (nullable HKSeriesType *)seriesTypeForIdentifier:(NSString *)identifier API_AVAILABLE(ios(11.0), watchos(4.0));
 + (HKWorkoutType *)workoutType;
-+ (HKActivitySummaryType *)activitySummaryType HK_AVAILABLE_IOS_WATCHOS(9_3, 2_2);
++ (HKActivitySummaryType *)activitySummaryType API_AVAILABLE(ios(9.3), watchos(2.2));
 
 @end
 
@@ -49,7 +52,7 @@
  @class         HKCharacteristicType
  @abstract      Represents a type of object that describes a characteristic of the user (such as date of birth).
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKCharacteristicType : HKObjectType
 @end
 
@@ -57,7 +60,7 @@
  @class         HKSampleType
  @abstract      Represents a type of HKSample.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKSampleType : HKObjectType
 @end
 
@@ -65,7 +68,7 @@
  @class         HKCategoryType
  @abstract      Represent a type of HKCategorySample.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKCategoryType : HKSampleType
 @end
 
@@ -73,27 +76,15 @@
  @class         HKCorrelationType
  @abstract      Represents a type of HKCorrelation
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKCorrelationType : HKSampleType
 @end
 
 /*!
- @enum          HKQuantityAggregationStyle
- @discussion    Describes how quantities can be aggregated over time.
- 
- @constant      HKQuantityAggregationStyleCumulative    Samples may be summed over a time interval.
- @constant      HKQuantityAggregationStyleDiscrete      Samples may be averaged over a time interval.
- */
-typedef NS_ENUM(NSInteger, HKQuantityAggregationStyle) {
-    HKQuantityAggregationStyleCumulative = 0,
-    HKQuantityAggregationStyleDiscrete,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-
-/*!
  @class         HKDocumentType
  @abstract      Represents a type of HKDocument.
  */
-HK_CLASS_AVAILABLE_IOS_ONLY(10_0)
+HK_EXTERN API_AVAILABLE(ios(10.0))
 @interface HKDocumentType : HKSampleType
 @end
 
@@ -101,7 +92,7 @@
  @class         HKQuantityType
  @abstract      Represents types of HKQuantitySamples.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKQuantityType : HKSampleType
 
 @property (readonly) HKQuantityAggregationStyle aggregationStyle;
@@ -116,18 +107,29 @@
 @end
 
 /*!
- @class         HKCategoryType
+ @class         HKWorkoutType
  @abstract      Represents a workout or exercise
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKWorkoutType : HKSampleType
 @end
 
 /*!
+ @class         HKSeriesType
+ @abstract      Represents a type of HKSeriesSample
+ */
+HK_EXTERN API_AVAILABLE(ios(11.0), watchos(4.0))
+@interface HKSeriesType : HKSampleType
+
++ (instancetype)workoutRouteType;
+
+@end
+
+/*!
  @class         HKActivitySummaryType
  @abstract      Represents an HKActivitySummary
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_3, 2_2)
+HK_EXTERN API_AVAILABLE(ios(9.3), watchos(2.2))
 @interface HKActivitySummaryType : HKObjectType
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -11,7 +11,7 @@
 
 typedef void(^HKObserverQueryCompletionHandler)(void);
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKObserverQuery : HKQuery
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h	2017-05-25 08:27:19.000000000 -0400
@@ -15,7 +15,7 @@
  @class         HKQuantity
  @abstract      The HKQuantity class provides an encapsulation of a quantity value and the unit of measurement.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKQuantity : NSObject <NSSecureCoding, NSCopying>
 
 - (instancetype)init NS_UNAVAILABLE;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h	2017-05-25 08:27:19.000000000 -0400
@@ -0,0 +1,18 @@
+//
+//  HKQuantityAggregationStyle.h
+//  HealthKit
+//
+//  Copyright (c) 2013-2017 Apple Inc. All rights reserved.
+//
+
+/*!
+ @enum          HKQuantityAggregationStyle
+ @discussion    Describes how quantities can be aggregated over time.
+ 
+ @constant      HKQuantityAggregationStyleCumulative    Samples may be summed over a time interval.
+ @constant      HKQuantityAggregationStyleDiscrete      Samples may be averaged over a time interval.
+ */
+typedef NS_ENUM(NSInteger, HKQuantityAggregationStyle) {
+    HKQuantityAggregationStyleCumulative = 0,
+    HKQuantityAggregationStyleDiscrete,
+} API_AVAILABLE(ios(8.0), watchos(2.0));
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h	2017-05-25 08:27:19.000000000 -0400
@@ -16,7 +16,7 @@
  @class         HKQuantitySample
  @abstract      An HKObject subclass representing a quantity measurement.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKQuantitySample : HKSample
 
 @property (readonly, strong) HKQuantityType *quantityType;
@@ -61,11 +61,11 @@
                              startDate:(NSDate *)startDate
                                endDate:(NSDate *)endDate
                                 device:(nullable HKDevice *)device
-                              metadata:(nullable NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+                              metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(9.0), watchos(2.0));
 
 @end
 
 // Predicate Key Paths
-HK_EXTERN NSString * const HKPredicateKeyPathQuantity HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKPredicateKeyPathQuantity API_AVAILABLE(ios(8.0), watchos(2.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h	2016-09-29 00:39:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h	2017-05-20 23:54:28.000000000 -0400
@@ -16,11 +16,11 @@
 @class HKSampleType;
 @class HKSource;
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKQuery : NSObject
 
-@property (readonly, strong, nullable) HKObjectType *objectType HK_AVAILABLE_IOS_WATCHOS(9_3, 2_2);
-@property (readonly, strong, nullable) HKSampleType *sampleType NS_DEPRECATED_IOS(8_0, 9_3, "Use objectType") __WATCHOS_DEPRECATED(2.0, 2.2, "Use objectType");
+@property (readonly, strong, nullable) HKObjectType *objectType API_AVAILABLE(ios(9.3), watchos(2.2));
+@property (readonly, strong, nullable) HKSampleType *sampleType API_DEPRECATED_WITH_REPLACEMENT("objectType", ios(8.0, 9.3), watchos(2.0, 2.2));
 
 @property (readonly, strong, nullable) NSPredicate *predicate;
 
@@ -41,8 +41,7 @@
     HKQueryOptionNone               = 0,
     HKQueryOptionStrictStartDate    = 1 << 0,
     HKQueryOptionStrictEndDate      = 1 << 1,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 @interface HKQuery (HKObjectPredicates)
 
@@ -103,7 +102,7 @@
  
  @param         sourceRevisions The list of source revisions.
  */
-+ (NSPredicate *)predicateForObjectsFromSourceRevisions:(NSSet<HKSourceRevision *> *)sourceRevisions HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
++ (NSPredicate *)predicateForObjectsFromSourceRevisions:(NSSet<HKSourceRevision *> *)sourceRevisions API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        predicateForObjectsFromDevices:
@@ -114,7 +113,7 @@
  
  @param         devices     The set of devices that generated data.
  */
-+ (NSPredicate *)predicateForObjectsFromDevices:(NSSet<HKDevice *> *)devices HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
++ (NSPredicate *)predicateForObjectsFromDevices:(NSSet<HKDevice *> *)devices API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        predicateForObjectsWithDeviceProperty:allowedValues:
@@ -127,7 +126,7 @@
  @param         allowedValues   The set of values for which the device property can match. An empty set will match all
                 devices whose property value is nil.
  */
-+ (NSPredicate *)predicateForObjectsWithDeviceProperty:(NSString *)key allowedValues:(NSSet<NSString *> *)allowedValues HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
++ (NSPredicate *)predicateForObjectsWithDeviceProperty:(NSString *)key allowedValues:(NSSet<NSString *> *)allowedValues API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        predicateForObjectWithUUID:
@@ -271,6 +270,18 @@
  */
 + (NSPredicate *)predicateForWorkoutsWithOperatorType:(NSPredicateOperatorType)operatorType totalSwimmingStrokeCount:(HKQuantity *)totalSwimmingStrokeCount;
 
+/*!
+ @method        predicateForWorkoutsWithOperatorType:totalFlightsClimbed:
+ @abstract      Creates a predicate for use with HKQuery subclasses.
+ @discussion    Creates a query predicate that matches HKWorkouts by the given operator type and totalFlightsClimbed
+ 
+ @param         operatorType                The operator type for the expression.
+ @param         totalFlightsClimbed         The value that the workout's totalFlightsClimbed is being compared to.
+                                            It is the right hand side of the expression. The unit for this value should
+                                            be of type Count.
+ */
++ (NSPredicate *)predicateForWorkoutsWithOperatorType:(NSPredicateOperatorType)operatorType totalFlightsClimbed:(HKQuantity *)totalFlightsClimbed API_AVAILABLE(ios(11.0), watchos(4.0));
+
 @end
 
 @interface HKQuery (HKActivitySummaryPredicates)
@@ -283,7 +294,7 @@
  @param         dateComponents  The date components of the activity summary. These date components should contain era, year, month,
                 and day components in the gregorian calendar.
  */
-+ (NSPredicate *)predicateForActivitySummaryWithDateComponents:(NSDateComponents *)dateComponents HK_AVAILABLE_IOS_WATCHOS(9_3, 2_2);
++ (NSPredicate *)predicateForActivitySummaryWithDateComponents:(NSDateComponents *)dateComponents API_AVAILABLE(ios(9.3), watchos(2.2));
 
 /*!
  @method        predicateForActivitySummariesBetweenStartDateComponents:endDateComponents:
@@ -296,7 +307,7 @@
  @param         endDateComponents   The date components that define the end of the range. These date components should contain era, 
                 year, month, and day components in the gregorian calendar.
  */
-+ (NSPredicate *)predicateForActivitySummariesBetweenStartDateComponents:(NSDateComponents *)startDateComponents endDateComponents:(NSDateComponents *)endDateComponents HK_AVAILABLE_IOS_WATCHOS(9_3, 2_2);
++ (NSPredicate *)predicateForActivitySummariesBetweenStartDateComponents:(NSDateComponents *)startDateComponents endDateComponents:(NSDateComponents *)endDateComponents API_AVAILABLE(ios(9.3), watchos(2.2));
 
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h	2017-05-25 08:27:19.000000000 -0400
@@ -15,7 +15,7 @@
  @class         HKSample
  @abstract      An abstract class representing measurements taken over a period of time.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKSample : HKObject
 
 @property (readonly, strong) HKSampleType *sampleType;
@@ -26,11 +26,11 @@
 @end
 
 // Sort Identifiers
-HK_EXTERN NSString * const HKSampleSortIdentifierStartDate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKSampleSortIdentifierEndDate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKSampleSortIdentifierStartDate API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKSampleSortIdentifierEndDate API_AVAILABLE(ios(8.0), watchos(2.0));
 
 // Predicate Key Paths
-HK_EXTERN NSString * const HKPredicateKeyPathStartDate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathEndDate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKPredicateKeyPathStartDate API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathEndDate API_AVAILABLE(ios(8.0), watchos(2.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -16,7 +16,7 @@
  @class         HKSampleQuery
  @abstract      A concrete subclass of HKQuery that provides an interface to retrieve HKSample objects.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKSampleQuery : HKQuery
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h	2017-05-25 08:27:19.000000000 -0400
@@ -0,0 +1,38 @@
+//
+//  HKSeriesBuilder.h
+//  HealthKit
+//
+//  Copyright (c) 2015 Apple. All rights reserved.
+//
+
+#import <HealthKit/HKDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @class         HKSeriesBuilder
+ @abstract      An HKSeriesBuilder is an abstract class for generating HKSeriesSample objects. 
+                Concrete subclasses generate the actual HKSeriesSample objects.
+ */
+HK_EXTERN
+@interface HKSeriesBuilder : NSObject <NSSecureCoding>
+
+/*!
+ @method        discard
+ @abstract      Stop series generation and discard all collected data.
+ @discussion    This method informs the receiver that no more data should be collected and all
+                previously collected data should be deleted and the receiver will be considered
+                invalid. Any further calls to the receiver will result in an exception.
+ */
+- (void)discard;
+
+
+/*!
+ @method        init
+ @abstract      Use only subclass initializer methods.
+ */
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h	2017-05-25 08:27:19.000000000 -0400
@@ -0,0 +1,30 @@
+//
+//  HKSeriesSample.h
+//  HealthKit
+//
+//  Copyright (c) 2015 Apple. All rights reserved.
+//
+
+#import <HealthKit/HKSample.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+
+/*!
+ @class         HKSeriesSample
+ @abstract      This class represents a type of HKSample that references a series of data.
+ */
+HK_EXTERN
+@interface HKSeriesSample : HKSample
+
+/*!
+ @property      count
+ @abstract      The number of individual series datum represented by the receiver and accessible
+                through the appropriate HKQuery series subclass.
+ */
+@property (readonly) NSUInteger count;
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h	2017-05-25 08:27:19.000000000 -0400
@@ -13,7 +13,7 @@
  @class     HKSource
  @abstract  Represents the entity that created an object stored by HealthKit.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKSource : NSObject <NSSecureCoding, NSCopying>
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -13,7 +13,7 @@
  @class         HKSourceQuery
  @abstract      A query that returns a set of sources that have saved objects matching certain criteria.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKSourceQuery : HKQuery
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h	2017-05-25 08:27:19.000000000 -0400
@@ -16,7 +16,7 @@
  @abstract      Represents a specific revision of an HKSource.
  */
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(9_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(9.0), watchos(2.0))
 @interface HKSourceRevision : NSObject <NSSecureCoding, NSCopying>
 
 /*!
@@ -33,6 +33,31 @@
 @property (readonly, nullable) NSString *version;
 
 /*!
+ @property      productType
+ @abstract      Represents the product type of the device running HealthKit when the object was created.
+ @discussion    This value may be nil for older data, which indicates an unknown product type.
+ */
+@property (readonly, copy, nullable) NSString *productType API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @property      operatingSystemVersion
+ @abstract      Represents the operating system version of the device running HealthKit when the object was created.
+ @discussion    iOS versions after 8.0 but prior to 8.2 are saved as 8.0, and iOS version after 8.2 but prior to 9.0
+                are saved as 8.2.
+ */
+@property (readonly, assign) NSOperatingSystemVersion operatingSystemVersion API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @method        initWithSource:version:productType:operatingSystemVersion:
+ @abstract      Initializes a new HKSourceRevision with the given source, version, product type, and operating system
+                version.
+ */
+- (instancetype)initWithSource:(HKSource *)source
+                       version:(nullable NSString *)version
+                   productType:(nullable NSString *)productType
+        operatingSystemVersion:(NSOperatingSystemVersion)operatingSystemVersion API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
  @method        initWithSource:version:
  @abstract      Initializes a new HKSourceRevision with the given source and version.
  */
@@ -42,4 +67,9 @@
 
 @end
 
+// Constants to match on any value of that property when querying for samples from an HKSourceRevision
+HK_EXTERN NSString * const HKSourceRevisionAnyVersion API_AVAILABLE(ios(11.0), watchos(4.0));
+HK_EXTERN NSString * const HKSourceRevisionAnyProductType API_AVAILABLE(ios(11.0), watchos(4.0));
+HK_EXTERN NSOperatingSystemVersion const HKSourceRevisionAnyOperatingSystem API_AVAILABLE(ios(11.0), watchos(4.0));
+
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h	2017-05-20 23:54:28.000000000 -0400
@@ -37,13 +37,13 @@
     HKStatisticsOptionDiscreteMin               = 1 << 2,
     HKStatisticsOptionDiscreteMax               = 1 << 3,
     HKStatisticsOptionCumulativeSum             = 1 << 4,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @class         HKStatistics
  @abstract      Represents statistics for quantity samples over a period of time.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKStatistics : NSObject <NSSecureCoding, NSCopying>
 
 @property (readonly, strong) HKQuantityType *quantityType;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -12,7 +12,7 @@
 
 @class HKStatistics;
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKStatisticsCollection : NSObject
 
 - (instancetype)init NS_UNAVAILABLE;
@@ -49,7 +49,7 @@
 
 @end
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKStatisticsCollectionQuery : HKQuery
 
 @property (readonly, strong) NSDate *anchorDate;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h	2016-10-10 19:45:12.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -16,7 +16,7 @@
  @class     HKStatisticsQuery
  @abstract  Calculates statistics on quantity samples matching the given quantity type and predicate.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKStatisticsQuery : HKQuery
 
 - (instancetype)initWithQuantityType:(HKQuantityType *)quantityType
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h	2016-09-29 00:39:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h	2017-05-25 06:21:06.000000000 -0400
@@ -17,89 +17,92 @@
 typedef NSString * HKQuantityTypeIdentifier NS_STRING_ENUM;
 
 // Body Measurements
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyMassIndex HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Scalar(Count),               Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyFatPercentage HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);         // Scalar(Percent, 0.0 - 1.0),  Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierHeight HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);                    // Length,                      Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyMass HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);                  // Mass,                        Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierLeanBodyMass HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);              // Mass,                        Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyMassIndex API_AVAILABLE(ios(8.0), watchos(2.0));               // Scalar(Count),               Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyFatPercentage API_AVAILABLE(ios(8.0), watchos(2.0));           // Scalar(Percent, 0.0 - 1.0),  Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierHeight API_AVAILABLE(ios(8.0), watchos(2.0));                      // Length,                      Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyMass API_AVAILABLE(ios(8.0), watchos(2.0));                    // Mass,                        Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierLeanBodyMass API_AVAILABLE(ios(8.0), watchos(2.0));                // Mass,                        Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierWaistCircumference API_AVAILABLE(ios(11.0), watchos(4.0));         // Length,                      Discrete
 
 // Fitness
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierStepCount HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);                 // Scalar(Count),               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceWalkingRunning HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);    // Length,                      Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceCycling HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Length,                      Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceWheelchair HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);       // Length,               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBasalEnergyBurned HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);         // Energy,                      Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierActiveEnergyBurned HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);        // Energy,                      Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierFlightsClimbed HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);            // Scalar(Count),               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierNikeFuel HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);                  // Scalar(Count),               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierAppleExerciseTime HK_AVAILABLE_IOS_WATCHOS(9_3, 2_2);         // Time                         Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierPushCount HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);                // Scalar(Count),               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceSwimming HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);         // Length,                      Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierSwimmingStrokeCount HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);      // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierStepCount API_AVAILABLE(ios(8.0), watchos(2.0));                   // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceWalkingRunning API_AVAILABLE(ios(8.0), watchos(2.0));      // Length,                      Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceCycling API_AVAILABLE(ios(8.0), watchos(2.0));             // Length,                      Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceWheelchair API_AVAILABLE(ios(10.0), watchos(3.0));         // Length,                      Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBasalEnergyBurned API_AVAILABLE(ios(8.0), watchos(2.0));           // Energy,                      Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierActiveEnergyBurned API_AVAILABLE(ios(8.0), watchos(2.0));          // Energy,                      Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierFlightsClimbed API_AVAILABLE(ios(8.0), watchos(2.0));              // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierNikeFuel API_AVAILABLE(ios(8.0), watchos(2.0));                    // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierAppleExerciseTime API_AVAILABLE(ios(9.3), watchos(2.2));           // Time                         Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierPushCount API_AVAILABLE(ios(10.0), watchos(3.0));                  // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDistanceSwimming API_AVAILABLE(ios(10.0), watchos(3.0));           // Length,                      Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierSwimmingStrokeCount API_AVAILABLE(ios(10.0), watchos(3.0));        // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierVO2Max API_AVAILABLE(ios(11.0), watchos(4.0));                     // ml/(kg*min)                  Discrete
 
 // Vitals
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierHeartRate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);                 // Scalar(Count)/Time,          Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyTemperature HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Temperature,                 Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBasalBodyTemperature HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);                   // Basal Body Temperature,      Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodPressureSystolic HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);     // Pressure,                    Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodPressureDiastolic HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);    // Pressure,                    Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierRespiratoryRate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Scalar(Count)/Time,          Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierHeartRate API_AVAILABLE(ios(8.0), watchos(2.0));                   // Scalar(Count)/Time,          Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBodyTemperature API_AVAILABLE(ios(8.0), watchos(2.0));             // Temperature,                 Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBasalBodyTemperature API_AVAILABLE(ios(9.0), watchos(2.0));        // Basal Body Temperature,      Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodPressureSystolic API_AVAILABLE(ios(8.0), watchos(2.0));       // Pressure,                    Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodPressureDiastolic API_AVAILABLE(ios(8.0), watchos(2.0));      // Pressure,                    Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierRespiratoryRate API_AVAILABLE(ios(8.0), watchos(2.0));             // Scalar(Count)/Time,          Discrete
 
 // Results
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierOxygenSaturation HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);          // Scalar (Percent, 0.0 - 1.0,  Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierPeripheralPerfusionIndex HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);  // Scalar(Percent, 0.0 - 1.0),  Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodGlucose HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);              // Mass/Volume,                 Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierNumberOfTimesFallen HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);       // Scalar(Count),               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierElectrodermalActivity HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);     // Conductance,                 Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierInhalerUsage HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);              // Scalar(Count),               Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodAlcoholContent HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);       // Scalar(Percent, 0.0 - 1.0),  Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierForcedVitalCapacity HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);       // Volume,                      Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierForcedExpiratoryVolume1 HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);   // Volume,                      Discrete
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierPeakExpiratoryFlowRate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);    // Volume/Time,                 Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierOxygenSaturation API_AVAILABLE(ios(8.0), watchos(2.0));            // Scalar (Percent, 0.0 - 1.0,  Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierPeripheralPerfusionIndex API_AVAILABLE(ios(8.0), watchos(2.0));    // Scalar(Percent, 0.0 - 1.0),  Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodGlucose API_AVAILABLE(ios(8.0), watchos(2.0));                // Mass/Volume,                 Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierNumberOfTimesFallen API_AVAILABLE(ios(8.0), watchos(2.0));         // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierElectrodermalActivity API_AVAILABLE(ios(8.0), watchos(2.0));       // Conductance,                 Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierInhalerUsage API_AVAILABLE(ios(8.0), watchos(2.0));                // Scalar(Count),               Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierInsulinDelivery API_AVAILABLE(ios(11.0), watchos(4.0));            // Pharmacology (IU)            Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierBloodAlcoholContent API_AVAILABLE(ios(8.0), watchos(2.0));         // Scalar(Percent, 0.0 - 1.0),  Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierForcedVitalCapacity API_AVAILABLE(ios(8.0), watchos(2.0));         // Volume,                      Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierForcedExpiratoryVolume1 API_AVAILABLE(ios(8.0), watchos(2.0));     // Volume,                      Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierPeakExpiratoryFlowRate API_AVAILABLE(ios(8.0), watchos(2.0));      // Volume/Time,                 Discrete
 
 // Nutrition
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatTotal HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatPolyunsaturated HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0); // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatMonounsaturated HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0); // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatSaturated HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);       // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCholesterol HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);        // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietarySodium HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCarbohydrates HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);      // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFiber HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);              // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietarySugar HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);              // Mass,   Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryEnergyConsumed HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);     // Energy, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryProtein HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);            // Mass,   Cumulative
-
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminA HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminB6 HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);          // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminB12 HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);         // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminC HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminD HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminE HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminK HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCalcium HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);            // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryIron HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);               // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryThiamin HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);            // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryRiboflavin HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);         // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryNiacin HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFolate HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryBiotin HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryPantothenicAcid HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);    // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryPhosphorus HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);         // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryIodine HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryMagnesium HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);          // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryZinc HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);               // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietarySelenium HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCopper HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryManganese HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);          // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryChromium HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryMolybdenum HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);         // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryChloride HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryPotassium HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);          // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCaffeine HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);           // Mass, Cumulative
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryWater HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);              // Volume, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatTotal API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatPolyunsaturated API_AVAILABLE(ios(8.0), watchos(2.0));   // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatMonounsaturated API_AVAILABLE(ios(8.0), watchos(2.0));   // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFatSaturated API_AVAILABLE(ios(8.0), watchos(2.0));         // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCholesterol API_AVAILABLE(ios(8.0), watchos(2.0));          // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietarySodium API_AVAILABLE(ios(8.0), watchos(2.0));               // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCarbohydrates API_AVAILABLE(ios(8.0), watchos(2.0));        // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFiber API_AVAILABLE(ios(8.0), watchos(2.0));                // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietarySugar API_AVAILABLE(ios(8.0), watchos(2.0));                // Mass,   Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryEnergyConsumed API_AVAILABLE(ios(8.0), watchos(2.0));       // Energy, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryProtein API_AVAILABLE(ios(8.0), watchos(2.0));              // Mass,   Cumulative
+
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminA API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminB6 API_AVAILABLE(ios(8.0), watchos(2.0));            // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminB12 API_AVAILABLE(ios(8.0), watchos(2.0));           // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminC API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminD API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminE API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryVitaminK API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCalcium API_AVAILABLE(ios(8.0), watchos(2.0));              // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryIron API_AVAILABLE(ios(8.0), watchos(2.0));                 // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryThiamin API_AVAILABLE(ios(8.0), watchos(2.0));              // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryRiboflavin API_AVAILABLE(ios(8.0), watchos(2.0));           // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryNiacin API_AVAILABLE(ios(8.0), watchos(2.0));               // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryFolate API_AVAILABLE(ios(8.0), watchos(2.0));               // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryBiotin API_AVAILABLE(ios(8.0), watchos(2.0));               // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryPantothenicAcid API_AVAILABLE(ios(8.0), watchos(2.0));      // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryPhosphorus API_AVAILABLE(ios(8.0), watchos(2.0));           // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryIodine API_AVAILABLE(ios(8.0), watchos(2.0));               // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryMagnesium API_AVAILABLE(ios(8.0), watchos(2.0));            // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryZinc API_AVAILABLE(ios(8.0), watchos(2.0));                 // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietarySelenium API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCopper API_AVAILABLE(ios(8.0), watchos(2.0));               // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryManganese API_AVAILABLE(ios(8.0), watchos(2.0));            // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryChromium API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryMolybdenum API_AVAILABLE(ios(8.0), watchos(2.0));           // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryChloride API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryPotassium API_AVAILABLE(ios(8.0), watchos(2.0));            // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryCaffeine API_AVAILABLE(ios(8.0), watchos(2.0));             // Mass, Cumulative
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierDietaryWater API_AVAILABLE(ios(9.0), watchos(2.0));                // Volume, Cumulative
 
-HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierUVExposure HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);                // Scalar (Count), Discrete
+HK_EXTERN HKQuantityTypeIdentifier const HKQuantityTypeIdentifierUVExposure API_AVAILABLE(ios(9.0), watchos(2.0));                  // Scalar (Count), Discrete
 
 /*--------------------------------*/
 /*   HKCategoryType Identifiers   */
@@ -107,14 +110,14 @@
 
 typedef NSString * HKCategoryTypeIdentifier NS_STRING_ENUM;
 
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierSleepAnalysis HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);             // HKCategoryValueSleepAnalysis
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierAppleStandHour HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);            // HKCategoryValueAppleStandHour
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierCervicalMucusQuality HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);      // HKCategoryValueCervicalMucusQuality
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierOvulationTestResult HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);       // HKCategoryValueOvulationTestResult
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierMenstrualFlow HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);             // HKCategoryValueMenstrualFlow
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierIntermenstrualBleeding HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);    // (Spotting) HKCategoryValue
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierSexualActivity HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);            // HKCategoryValue
-HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierMindfulSession HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);           // HKCategoryValue
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierSleepAnalysis API_AVAILABLE(ios(8.0), watchos(2.0));               // HKCategoryValueSleepAnalysis
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierAppleStandHour API_AVAILABLE(ios(9.0), watchos(2.0));              // HKCategoryValueAppleStandHour
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierCervicalMucusQuality API_AVAILABLE(ios(9.0), watchos(2.0));        // HKCategoryValueCervicalMucusQuality
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierOvulationTestResult API_AVAILABLE(ios(9.0), watchos(2.0));         // HKCategoryValueOvulationTestResult
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierMenstrualFlow API_AVAILABLE(ios(9.0), watchos(2.0));               // HKCategoryValueMenstrualFlow
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierIntermenstrualBleeding API_AVAILABLE(ios(9.0), watchos(2.0));      // (Spotting) HKCategoryValue
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierSexualActivity API_AVAILABLE(ios(9.0), watchos(2.0));              // HKCategoryValue
+HK_EXTERN HKCategoryTypeIdentifier const HKCategoryTypeIdentifierMindfulSession API_AVAILABLE(ios(10.0), watchos(3.0));             // HKCategoryValue
 
 /*--------------------------------------*/
 /*   HKCharacteristicType Identifiers   */
@@ -122,11 +125,11 @@
 
 typedef NSString * HKCharacteristicTypeIdentifier NS_STRING_ENUM;
 
-HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierBiologicalSex HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);          // HKBiologicalSexObject
-HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierBloodType HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);              // HKBloodTypeObject
-HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierDateOfBirth HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);            // NSDateComponents
-HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierFitzpatrickSkinType HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);    // HKFitzpatrickSkinTypeObject
-HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierWheelchairUse HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);         // HKWheelchairUseObject
+HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierBiologicalSex API_AVAILABLE(ios(8.0), watchos(2.0));           // HKBiologicalSexObject
+HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierBloodType API_AVAILABLE(ios(8.0), watchos(2.0));               // HKBloodTypeObject
+HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierDateOfBirth API_AVAILABLE(ios(8.0), watchos(2.0));             // NSDateComponents
+HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierFitzpatrickSkinType API_AVAILABLE(ios(9.0), watchos(2.0));     // HKFitzpatrickSkinTypeObject
+HK_EXTERN HKCharacteristicTypeIdentifier const HKCharacteristicTypeIdentifierWheelchairUse API_AVAILABLE(ios(10.0), watchos(3.0));          // HKWheelchairUseObject
 
 /*-----------------------------------*/
 /*   HKCorrelationType Identifiers   */
@@ -134,8 +137,8 @@
 
 typedef NSString * HKCorrelationTypeIdentifier NS_STRING_ENUM;
 
-HK_EXTERN HKCorrelationTypeIdentifier const HKCorrelationTypeIdentifierBloodPressure HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN HKCorrelationTypeIdentifier const HKCorrelationTypeIdentifierFood HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN HKCorrelationTypeIdentifier const HKCorrelationTypeIdentifierBloodPressure API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN HKCorrelationTypeIdentifier const HKCorrelationTypeIdentifierFood API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*--------------------------------*/
 /*   HKDocumentType Identifiers   */
@@ -143,12 +146,18 @@
 
 typedef NSString * HKDocumentTypeIdentifier NS_STRING_ENUM;
 
-HK_EXTERN HKDocumentTypeIdentifier const HKDocumentTypeIdentifierCDA HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN HKDocumentTypeIdentifier const HKDocumentTypeIdentifierCDA API_AVAILABLE(ios(10.0), watchos(3.0));
 
 /*------------------------------*/
 /*   HKWorkoutType Identifier   */
 /*------------------------------*/
 
-HK_EXTERN NSString * const HKWorkoutTypeIdentifier HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+HK_EXTERN NSString * const HKWorkoutTypeIdentifier API_AVAILABLE(ios(8.0), watchos(2.0));
+
+/*--------------------------------*/
+/*   HKSeriesSample Identifiers   */
+/*--------------------------------*/
+
+HK_EXTERN NSString * const HKWorkoutRouteTypeIdentifier API_AVAILABLE(ios(11.0), watchos(4.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h	2016-10-10 19:45:13.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h	2017-05-21 00:17:43.000000000 -0400
@@ -9,7 +9,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKUnit : NSObject <NSSecureCoding, NSCopying>
 
 /// Returns a unique string representation for the unit that could be used with +unitFromString:
@@ -78,6 +78,12 @@
 // degC (degrees Celsius)    = 1.0 K - 273.15
 // degF (degrees Fahrenheit) = 1.8 K - 459.67
 //
+// [Conductance]
+// S    (siemens)
+//
+// [Pharmacology]
+// IU   (international unit)
+//
 // [Scalar]
 // count = 1
 // %     = 1/100
@@ -118,7 +124,7 @@
     HKMetricPrefixMega,     //10^6
     HKMetricPrefixGiga,     //10^9
     HKMetricPrefixTera      //10^12
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /* Mass Units */
 @interface HKUnit (Mass)
@@ -137,7 +143,7 @@
 + (instancetype)meterUnit;  // m
 + (instancetype)inchUnit;   // in
 + (instancetype)footUnit;   // ft
-+ (instancetype)yardUnit HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);   // yd
++ (instancetype)yardUnit API_AVAILABLE(ios(9.0), watchos(2.0));   // yd
 + (instancetype)mileUnit;   // mi
 @end
 
@@ -149,8 +155,8 @@
 + (instancetype)fluidOunceImperialUnit; // fl_oz_imp
 + (instancetype)pintUSUnit;             // pt_us
 + (instancetype)pintImperialUnit;       // pt_imp
-+ (instancetype)cupUSUnit HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);       // cup_us
-+ (instancetype)cupImperialUnit HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0); // cup_imp
++ (instancetype)cupUSUnit API_AVAILABLE(ios(9.0), watchos(2.0));       // cup_us
++ (instancetype)cupImperialUnit API_AVAILABLE(ios(9.0), watchos(2.0)); // cup_imp
 @end
 
 /* Pressure Units */
@@ -175,8 +181,10 @@
 @interface HKUnit (Energy)
 + (instancetype)jouleUnitWithMetricPrefix:(HKMetricPrefix)prefix;      // J
 + (instancetype)jouleUnit;          // J
-+ (instancetype)calorieUnit;        // cal
-+ (instancetype)kilocalorieUnit;    // kcal
++ (instancetype)kilocalorieUnit;    // 1 kcal = 4184.0 J
++ (instancetype)smallCalorieUnit API_AVAILABLE(ios(11.0), watchos(4.0));    // 1 cal = 4.1840 J
++ (instancetype)largeCalorieUnit API_AVAILABLE(ios(11.0), watchos(4.0));    // 1 Cal = 4184.0 J
++ (instancetype)calorieUnit API_DEPRECATED("Use smallCalorieUnit or largeCalorieUnit, depending on which you mean", ios(8.0, 11.0), watchos(2.0, 4.0));
 @end
 
 /* Temperature Units */
@@ -192,6 +200,11 @@
 + (instancetype)siemenUnit; // S
 @end
 
+/* Pharmacology Units */
+@interface HKUnit (Pharmacology)
++ (instancetype)internationalUnit NS_SWIFT_NAME(internationalUnit()) API_AVAILABLE(ios(11.0), watchos(4.0));  // IU
+@end
+
 /* Scalar Units */
 @interface HKUnit (Scalar)
 + (instancetype)countUnit;      // count
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h	2016-10-10 19:45:13.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h	2017-05-21 00:17:43.000000000 -0400
@@ -30,7 +30,7 @@
     HKWorkoutActivityTypeCurling,
     HKWorkoutActivityTypeCycling,
     HKWorkoutActivityTypeDance,
-    HKWorkoutActivityTypeDanceInspiredTraining NS_ENUM_DEPRECATED_IOS(8_0, 10_0, "Use HKWorkoutActivityTypeDance, HKWorkoutActivityTypeBarre, or HKWorkoutActivityTypePilates"), // This enum remains available to access older data.
+    HKWorkoutActivityTypeDanceInspiredTraining API_DEPRECATED("Use HKWorkoutActivityTypeDance, HKWorkoutActivityTypeBarre or HKWorkoutActivityTypePilates", ios(8.0, 10.0), watchos(2.0, 3.0)), // This enum remains available to access older data.
     HKWorkoutActivityTypeElliptical,
     HKWorkoutActivityTypeEquestrianSports, // Polo, Horse Racing, Horse Riding, etc.
     HKWorkoutActivityTypeFencing,
@@ -44,8 +44,8 @@
     HKWorkoutActivityTypeHunting,
     HKWorkoutActivityTypeLacrosse,
     HKWorkoutActivityTypeMartialArts,
-    HKWorkoutActivityTypeMindAndBody, // Tai chi, meditation, etc.
-    HKWorkoutActivityTypeMixedMetabolicCardioTraining, // Any mix of cardio-focused exercises
+    HKWorkoutActivityTypeMindAndBody, // Qigong, meditation, etc.
+    HKWorkoutActivityTypeMixedMetabolicCardioTraining API_DEPRECATED("Use HKWorkoutActivityTypeMixedCardio or HKWorkoutActivityTypeHighIntensityIntervalTraining", ios(8.0, 11.0), watchos(2.0, 4.0)), // This enum remains available to access older data.
     HKWorkoutActivityTypePaddleSports, // Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.
     HKWorkoutActivityTypePlay, // Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.
     HKWorkoutActivityTypePreparationAndRecovery, // Foam rolling, stretching, etc.
@@ -74,46 +74,82 @@
     HKWorkoutActivityTypeWrestling,
     HKWorkoutActivityTypeYoga,
     
-    HKWorkoutActivityTypeBarre              HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),    // HKWorkoutActivityTypeDanceInspiredTraining
-    HKWorkoutActivityTypeCoreTraining       HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeCrossCountrySkiing HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeDownhillSkiing     HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeFlexibility        HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeHighIntensityIntervalTraining    HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeJumpRope           HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeKickboxing         HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypePilates            HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),    // HKWorkoutActivityTypeDanceInspiredTraining
-    HKWorkoutActivityTypeSnowboarding       HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeStairs             HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeStepTraining       HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeWheelchairWalkPace HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutActivityTypeWheelchairRunPace  HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
+    HKWorkoutActivityTypeBarre              API_AVAILABLE(ios(10.0), watchos(3.0)),    // HKWorkoutActivityTypeDanceInspiredTraining
+    HKWorkoutActivityTypeCoreTraining       API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeCrossCountrySkiing API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeDownhillSkiing     API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeFlexibility        API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeHighIntensityIntervalTraining    API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeJumpRope           API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeKickboxing         API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypePilates            API_AVAILABLE(ios(10.0), watchos(3.0)),    // HKWorkoutActivityTypeDanceInspiredTraining
+    HKWorkoutActivityTypeSnowboarding       API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeStairs             API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeStepTraining       API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeWheelchairWalkPace API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeWheelchairRunPace  API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutActivityTypeTaiChi             API_AVAILABLE(ios(11.0), watchos(4.0)),
+    HKWorkoutActivityTypeMixedCardio        API_AVAILABLE(ios(11.0), watchos(4.0)),    // HKWorkoutActivityTypeMixedMetabolicCardioTraining
+    HKWorkoutActivityTypeHandCycling        API_AVAILABLE(ios(11.0), watchos(4.0)),
     
     HKWorkoutActivityTypeOther = 3000,
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 typedef NS_ENUM(NSInteger, HKWorkoutEventType) {
     HKWorkoutEventTypePause = 1,
     HKWorkoutEventTypeResume,
-    HKWorkoutEventTypeLap           HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutEventTypeMarker        HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutEventTypeMotionPaused  HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-    HKWorkoutEventTypeMotionResumed HK_ENUM_AVAILABLE_IOS_WATCHOS(10_0, 3_0),
-} HK_ENUM_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
+    HKWorkoutEventTypeLap           API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutEventTypeMarker        API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutEventTypeMotionPaused  API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutEventTypeMotionResumed API_AVAILABLE(ios(10.0), watchos(3.0)),
+    HKWorkoutEventTypeSegment       API_AVAILABLE(ios(11.0), watchos(4.0)),
+    HKWorkoutEventTypePauseOrResumeRequest API_AVAILABLE(ios(11.0), watchos(4.0)),
+} API_AVAILABLE(ios(8.0), watchos(2.0));
 
 /*!
  @class         HKWorkoutEvent
- @abstract      Represents a particular event that occurred during a workout
+ @abstract      Represents a particular event that occurred during a workout.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKWorkoutEvent : NSObject <NSSecureCoding, NSCopying>
 
+/*!
+ @property      workoutEventType
+ @abstract      Represents the type of event that occurred during a workout.
+ */
 @property (readonly, assign) HKWorkoutEventType type;
-@property (readonly, copy) NSDate *date;
-@property (readonly, copy, nullable) NSDictionary<NSString *, id> *metadata HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
 
-+ (instancetype)workoutEventWithType:(HKWorkoutEventType)type date:(NSDate *)date;
-+ (instancetype)workoutEventWithType:(HKWorkoutEventType)type date:(NSDate *)date metadata:(NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+@property (readonly, copy) NSDate *date API_DEPRECATED_WITH_REPLACEMENT("dateInterval", ios(8.0, 11.0), watchos(2.0, 4.0));
+
+/*!
+ @property      dateInterval
+ @abstract      Date interval representing the time period for which the event is valid.
+ @discussion    Most event types only support date intervals with zero duration. Events of type
+                HKWorkoutEventTypeSegment are currently the only events that support a nonzero duration.
+ */
+@property (readonly, copy) NSDateInterval *dateInterval API_AVAILABLE(ios(11.0), watchos(4.0));
+
+/*!
+ @property      metadata
+ @abstract      Extra information describing properties of the receiver.
+ @discussion    Keys must be NSString and values must be either NSString, NSNumber, NSDate, or
+                HKQuantity. See HKMetadata.h for potential metadata keys and values.
+ */
+@property (readonly, copy, nullable) NSDictionary<NSString *, id> *metadata API_AVAILABLE(ios(10.0), watchos(3.0));
+
++ (instancetype)workoutEventWithType:(HKWorkoutEventType)type date:(NSDate *)date API_DEPRECATED_WITH_REPLACEMENT("workoutEventWithType:dateInterval:metadata:", ios(8.0, 11.0), watchos(2.0, 4.0));
+
++ (instancetype)workoutEventWithType:(HKWorkoutEventType)type date:(NSDate *)date metadata:(NSDictionary<NSString *, id> *)metadata API_DEPRECATED_WITH_REPLACEMENT("workoutEventWithType:dateInterval:metadata:", ios(10.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @method        workoutEventWithType:dateInterval:metadata:
+ @discussion    Creates an event with a date interval with or without a duration.
+ @param         type                    The type of event to create
+ @param         dateInterval            The dateInterval over which the event occurs
+ @param         metadata                Dictionary of metadata associated with the event, nullable
+ */
++ (instancetype)workoutEventWithType:(HKWorkoutEventType)type dateInterval:(NSDateInterval *)dateInterval metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(11.0), watchos(4.0));
+
 - (instancetype)init NS_UNAVAILABLE;
 
 @end
@@ -122,7 +158,7 @@
  @class         HKWorkout
  @abstract      An HKObject subclass representing a workout or activity
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(8_0, 2_0)
+HK_EXTERN API_AVAILABLE(ios(8.0), watchos(2.0))
 @interface HKWorkout : HKSample
 
 /*!
@@ -170,7 +206,15 @@
  @discussion    This metric should represent the total count of swimming strokes accumulated during the course of the
                 workout. It should be a quantity with a unit representing count.
  */
-@property (readonly, strong, nullable) HKQuantity *totalSwimmingStrokeCount HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+@property (readonly, strong, nullable) HKQuantity *totalSwimmingStrokeCount API_AVAILABLE(ios(10.0), watchos(3.0));
+
+/*!
+ @property      totalFlightsClimbed
+ @abstract      The total count of flights climbed during a workout
+ @discussion    This metric should represent the total count of flights accumulated during the course of the
+ workout. It should be a quantity with a unit representing count.
+ */
+@property (readonly, strong, nullable) HKQuantity *totalFlightsClimbed API_AVAILABLE(ios(11.0), watchos(4.0));
 
 /*!
  @method        workoutWithActivityType:startDate:endDate:
@@ -225,7 +269,7 @@
                       totalEnergyBurned:(nullable HKQuantity *)totalEnergyBurned
                           totalDistance:(nullable HKQuantity *)totalDistance
                                  device:(nullable HKDevice *)device
-                               metadata:(nullable NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+                               metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata:
@@ -269,7 +313,7 @@
                       totalEnergyBurned:(nullable HKQuantity *)totalEnergyBurned
                           totalDistance:(nullable HKQuantity *)totalDistance
                                  device:(nullable HKDevice *)device
-                               metadata:(nullable NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(9_0, 2_0);
+                               metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(9.0), watchos(2.0));
 
 /*!
  @method        workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalSwimmingStrokeCount:device:metadata:
@@ -294,21 +338,50 @@
                           totalDistance:(nullable HKQuantity *)totalDistance
                totalSwimmingStrokeCount:(nullable HKQuantity *)totalSwimmingStrokeCount
                                  device:(nullable HKDevice *)device
-                               metadata:(nullable NSDictionary<NSString *, id> *)metadata HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+                               metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(10.0), watchos(3.0));
+
+/*!
+ @method        workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalFlightsClimbed:device:metadata:
+ @discussion    If the optional total parameters are specified, matching samples that add up to the calculated total
+                quantities should be associated with this workout using addSamples:toWorkout:completion: in
+                HKHealthStore.
+ 
+ @param         workoutActivityType         The activity type of the workout
+ @param         startDate                   The point in time that the workout was started
+ @param         endDate                     The point in time that the workout was ended
+ @param         workoutEvents               An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)
+ @param         totalEnergyBurned           The amount of energy that was burned during the workout. (Optional)
+ @param         totalDistance               The total distance that was traveled during the workout. (Optional)
+ @param         totalFlightsClimbed         The total count of flights climbed that was accumulated during the workout. (Optional)
+ @param         device                      The HKDevice associated with the workout. (Optional)
+ @param         metadata                    Metadata for the workout. (Optional)
+ */
++ (instancetype)workoutWithActivityType:(HKWorkoutActivityType)workoutActivityType
+                              startDate:(NSDate *)startDate
+                                endDate:(NSDate *)endDate
+                          workoutEvents:(nullable NSArray<HKWorkoutEvent *> *)workoutEvents
+                      totalEnergyBurned:(nullable HKQuantity *)totalEnergyBurned
+                          totalDistance:(nullable HKQuantity *)totalDistance
+                    totalFlightsClimbed:(nullable HKQuantity *)totalFlightsClimbed
+                                 device:(nullable HKDevice *)device
+                               metadata:(nullable NSDictionary<NSString *, id> *)metadata API_AVAILABLE(ios(11.0), watchos(4.0));
 
 @end
 
 // Predicate Key Paths
-HK_EXTERN NSString * const HKPredicateKeyPathWorkoutDuration HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalDistance HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalEnergyBurned HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathWorkoutType HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalSwimmingStrokeCount HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKPredicateKeyPathWorkoutDuration API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalDistance API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalEnergyBurned API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathWorkoutType API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalSwimmingStrokeCount API_AVAILABLE(ios(10.0), watchos(3.0));
+HK_EXTERN NSString * const HKPredicateKeyPathWorkoutTotalFlightsClimbed API_AVAILABLE(ios(11.0), watchos(4.0));
+
 
 // Sort Identifiers
-HK_EXTERN NSString * const HKWorkoutSortIdentifierDuration HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalDistance HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalEnergyBurned HK_AVAILABLE_IOS_WATCHOS(8_0, 2_0);
-HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalSwimmingStrokeCount HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+HK_EXTERN NSString * const HKWorkoutSortIdentifierDuration API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalDistance API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalEnergyBurned API_AVAILABLE(ios(8.0), watchos(2.0));
+HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalSwimmingStrokeCount API_AVAILABLE(ios(10.0), watchos(3.0));
+HK_EXTERN NSString * const HKWorkoutSortIdentifierTotalFlightsClimbed API_AVAILABLE(ios(11.0), watchos(4.0));
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h	2017-05-25 08:27:19.000000000 -0400
@@ -0,0 +1,18 @@
+//
+//  HKWorkoutRoute.h
+//  HealthKit
+//
+//  Copyright © 2017 Apple. All rights reserved.
+//
+
+#import <HealthKit/HKSeriesSample.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - HKWorkoutRoute
+
+HK_EXTERN API_AVAILABLE(ios(11.0), watchos(4.0))
+@interface HKWorkoutRoute : HKSeriesSample
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h	2017-05-25 06:21:06.000000000 -0400
@@ -0,0 +1,80 @@
+//
+//  HKWorkoutRouteBuilder.h
+//  HealthKit
+//
+//  Copyright © 2017 Apple. All rights reserved.
+//
+
+#import <HealthKit/HKSeriesBuilder.h>
+#import <HealthKit/HKDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class HKHealthStore;
+@class HKDevice;
+@class HKWorkout;
+@class HKWorkoutRoute;
+@class CLLocation;
+
+/*!
+ @class         HKWorkoutRouteBuilder
+ @abstract      An HKWorkoutRouteBuilder is used to generate an HKWorkoutRoute.
+ @discussion    This class is intended for generating long-running location data collection such as
+                might be associated with a workout. If the discard method is called, collected data will be deleted.
+                Calling finishRouteWithWorkout:metadata: will stop and complete the route. If the builder is deleted,
+                or the client goes away before calling the finish method, data will be lost.
+ */
+HK_EXTERN API_AVAILABLE(ios(11.0), watchos(4.0))
+@interface HKWorkoutRouteBuilder : HKSeriesBuilder
+
+/*!
+ @method        initWithHealthStore:device:
+ @abstract      The designated initializer to create an HKWorkoutRouteBuilder.
+ @discussion    The HKHealthStore is retained during the life of the object for the saving of the series data and final
+                return of the series sample.
+ 
+ @param healthStore Specifies the HKHealthStore object to use for building the series.
+ @param device      The optional device represents the HKDevice from which the data is provided.
+ */
+- (instancetype)initWithHealthStore:(HKHealthStore *)healthStore
+                             device:(nullable HKDevice *)device NS_DESIGNATED_INITIALIZER;
+
+/*!
+ @method        insertRouteData:completion:
+ @abstract      Associate CLLocation with the receiver.
+ @discussion    Use this method to asynchronously add one or more CLLocation to the
+                series. Note that CLLocation may be inserted in any order but will be
+                sorted according to date when the series is finalized.
+ 
+ @param routeData  An array of one or more CLLocation.
+ @param completion The completion callback handler returns the status of the save. If the completion handler success is
+                   NO, then error is non-nil. An error here is considered fatal and the series builder will be complete.
+                   If data was previously saved, then the HKWorkoutRoute may be retrieved by the
+                   finishRouteWithMetadata: method.
+ */
+- (void)insertRouteData:(NSArray<CLLocation *> *)routeData
+             completion:(void(^)(BOOL success, NSError * _Nullable error))completion;
+
+/*!
+ @method        finishRouteWithWorkout:Metadata:completion:
+ @abstract      Method to stop data collection and return the associated HKWorkoutRoute.
+ @discussion    Call this method when the route has been completed. The completion handler will return the saved
+                HKWorkoutRoute. If no series data was added, then workoutRoute will be nil and an error returned. The
+                receiver will be considered invalid afterwards and any further calls to it will result in an exception.
+ 
+ @param workout    The HKWorkout object to which the route will be associated. Must be saved to HealthKit
+ @param metadata   Optional metadata may be added to associate with the series. Predefined keys are found in
+                   HKMetadata.h, or private NSString keys used by the client are allowed. Acceptable metadata value
+                   types are NSString, NSDate, NSNumber and HKQuantity
+ @param completion The completion callback handler returns the saved HKWorkoutRoute object. If workoutRoute is nil, an
+                   error will indicate why the series could not be returned including database inaccessibility during
+                   device lock. Subsequent requests for the HKWorkoutRoute can be made through HKSampleQuery or similar
+                   queries. workoutRoute cannot be associated to another workout.
+ */
+- (void)finishRouteWithWorkout:(HKWorkout *)workout
+                      metadata:(nullable NSDictionary<NSString *, id> *)metadata
+                    completion:(void(^)(HKWorkoutRoute * _Nullable workoutRoute, NSError * _Nullable error))completion;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h	2017-05-25 08:27:19.000000000 -0400
@@ -0,0 +1,41 @@
+//
+//  HKWorkoutRouteQuery.h
+//  HealthKit
+//
+//  Copyright © 2017 Apple. All rights reserved.
+//
+
+#import <HealthKit/HKQuery.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class HKWorkoutRoute;
+@class CLLocation;
+
+/*!
+ @class         HKWorkoutRouteQuery
+ @abstract      An HKWorkoutRouteQuery is used to access data associated with an HKWorkoutRoute.
+ @discussion    Once instantiated, call HKHealthStore executeQuery to begin enumerating the route data. Call
+                HKHealthStore stopQuery to discontinue further route data reporting.
+ */
+HK_EXTERN API_AVAILABLE(ios(11.0), watchos(4.0))
+@interface HKWorkoutRouteQuery : HKQuery
+
+/*!
+ @method        initWithRoute:handler:
+ @abstract      Returns a query that will retrieve CLLocation objects for the specified
+ workoutRoute.
+ 
+ @param workoutRoute    The HKWorkoutRoute for which the location data will be returned.
+ @param dataHandler     The block to invoke with results from the query. It is called repeatedly with an array of
+                        CLLocation objects until all data is returned and the done parameter is YES or if HKHealthStore
+                        stopQuery: is called. The stopQuery call can be made within the dataHandler block. The number of
+                        objects returned in routeData per dataHandler call is unspecified. Once done is YES, or
+                        stopQuery called, the query is complete and no more calls to the handler will be made.
+ */
+- (instancetype)initWithRoute:(HKWorkoutRoute *)workoutRoute
+                  dataHandler:(void(^)(HKWorkoutRouteQuery *query, NSArray<CLLocation *> * _Nullable routeData, BOOL done, NSError * _Nullable error))dataHandler NS_DESIGNATED_INITIALIZER;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h	2016-10-10 19:45:07.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h	2017-05-25 08:27:19.000000000 -0400
@@ -20,8 +20,8 @@
     HKWorkoutSessionStateNotStarted = 1,
     HKWorkoutSessionStateRunning,
     HKWorkoutSessionStateEnded,
-    HKWorkoutSessionStatePaused HK_AVAILABLE_WATCHOS_ONLY(3_0),
-} HK_AVAILABLE_WATCHOS_ONLY(2_0);
+    HKWorkoutSessionStatePaused API_AVAILABLE(watchos(3.0)),
+} API_AVAILABLE(watchos(2.0));
 
 
 /*!
@@ -33,14 +33,14 @@
     HKWorkoutSessionLocationTypeUnknown = 1,
     HKWorkoutSessionLocationTypeIndoor,
     HKWorkoutSessionLocationTypeOutdoor,
-} HK_AVAILABLE_IOS_WATCHOS(10_0, 2_0);
+} API_AVAILABLE(ios(10.0), watchos(2.0));
 
 
 /*!
  @class         HKWorkoutConfiguration
  @abstract      An HKWorkoutConfiguration is an object that can be used to describe the a workout activity.
  */
-HK_CLASS_AVAILABLE_IOS_WATCHOS(10_0, 3_0)
+HK_EXTERN API_AVAILABLE(ios(10.0), watchos(3.0))
 @interface HKWorkoutConfiguration : NSObject <NSCopying, NSSecureCoding>
 
 /*!
@@ -76,21 +76,21 @@
  @class         HKWorkoutSession
  @abstract      An HKWorkoutSession is an object describing the properties of a workout activity session.
  */
-HK_CLASS_AVAILABLE_WATCHOS_ONLY(2_0)
+HK_EXTERN API_AVAILABLE(watchos(2.0))
 @interface HKWorkoutSession : NSObject <NSSecureCoding>
 
 /*!
  @property      activityType
  @abstract      Indicates the type of workout that will be performed during the session.
  */
-@property (readonly) HKWorkoutActivityType activityType __WATCHOS_DEPRECATED(2_0, 3_0, "Use workoutConfiguration");
+@property (readonly) HKWorkoutActivityType activityType API_DEPRECATED_WITH_REPLACEMENT("workoutConfiguration", watchos(2.0, 3.0));
 
 /*!
  @property      locationType
  @abstract      Indicates the type of location (indoors vs. outdoors) where the workout will take place.
  @discussion    Knowing the location type allows for more accurate measurements and better performance.
  */
-@property (readonly) HKWorkoutSessionLocationType locationType __WATCHOS_DEPRECATED(2_0, 3_0, "Use workoutConfiguration");
+@property (readonly) HKWorkoutSessionLocationType locationType API_DEPRECATED_WITH_REPLACEMENT("workoutConfiguration", watchos(2.0, 3.0));
 
 /*!
  @property      workoutConfiguration
@@ -98,7 +98,7 @@
  @discussion    This returns a copy of the configuration passed when creating the HKWorkoutSession. Changes made to
                 the returned object have no impact on the HKWorkoutSession.
  */
-@property (readonly, copy) HKWorkoutConfiguration *workoutConfiguration HK_AVAILABLE_WATCHOS_ONLY(3_0);
+@property (readonly, copy) HKWorkoutConfiguration *workoutConfiguration API_AVAILABLE(watchos(3.0));
 
 /*!
  @property      delegate
@@ -139,7 +139,7 @@
  @param         locationType    The type of location where the workout will be performed.
  */
 - (instancetype)initWithActivityType:(HKWorkoutActivityType)activityType
-                        locationType:(HKWorkoutSessionLocationType)locationType __WATCHOS_DEPRECATED(2_0, 3_0, "Use initWithConfiguration:error:");
+                        locationType:(HKWorkoutSessionLocationType)locationType API_DEPRECATED_WITH_REPLACEMENT("initWithConfiguration:error:", watchos(2.0, 3.0));
 
 /*!
  @method        initWithConfiguration:
@@ -148,7 +148,7 @@
  @param         error                If the configuration does not specify valid configuration properties, an
                                      an NSError describing the error is set and nil is returned.
  */
-- (nullable instancetype)initWithConfiguration:(HKWorkoutConfiguration *)workoutConfiguration error:(NSError **)error HK_AVAILABLE_WATCHOS_ONLY(3_0);
+- (nullable instancetype)initWithConfiguration:(HKWorkoutConfiguration *)workoutConfiguration error:(NSError **)error API_AVAILABLE(watchos(3.0));
 
 - (instancetype)init NS_UNAVAILABLE;
 
@@ -160,7 +160,7 @@
  @abstract      This protocol should be implemented to be notified when a workout session's state changes.
  @discussion    The methods on this protocol are called on an anonymous serial background queue.
  */
-HK_AVAILABLE_WATCHOS_ONLY(2_0)
+API_AVAILABLE(watchos(2.0))
 @protocol HKWorkoutSessionDelegate <NSObject>
 
 /*!
@@ -192,7 +192,7 @@
                 to the session delegate via this method. Clients may save the generated events to use when creating an
                 HKWorkout object.
  */
-- (void)workoutSession:(HKWorkoutSession *)workoutSession didGenerateEvent:(HKWorkoutEvent *)event HK_AVAILABLE_IOS_WATCHOS(10_0, 3_0);
+- (void)workoutSession:(HKWorkoutSession *)workoutSession didGenerateEvent:(HKWorkoutEvent *)event API_AVAILABLE(ios(10.0), watchos(3.0));
 
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes	2017-05-25 08:27:19.000000000 -0400
@@ -0,0 +1,5 @@
+---
+Name:            HealthKit
+Tags:
+- Name: HKErrorCode
+  NSErrorDomain: HKErrorDomain
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h	2016-10-10 19:45:13.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h	2017-05-25 08:27:19.000000000 -0400
@@ -8,8 +8,8 @@
 #import <HealthKit/HKActivitySummary.h>
 #import <HealthKit/HKActivitySummaryQuery.h>
 #import <HealthKit/HKAnchoredObjectQuery.h>
-#import <HealthKit/HKCategorySample.h>
 #import <HealthKit/HKCDADocumentSample.h>
+#import <HealthKit/HKCategorySample.h>
 #import <HealthKit/HKCharacteristicObjects.h>
 #import <HealthKit/HKCorrelation.h>
 #import <HealthKit/HKCorrelationQuery.h>
@@ -28,6 +28,8 @@
 #import <HealthKit/HKQuery.h>
 #import <HealthKit/HKSample.h>
 #import <HealthKit/HKSampleQuery.h>
+#import <HealthKit/HKSeriesBuilder.h>
+#import <HealthKit/HKSeriesSample.h>
 #import <HealthKit/HKSource.h>
 #import <HealthKit/HKSourceQuery.h>
 #import <HealthKit/HKSourceRevision.h>
@@ -37,4 +39,7 @@
 #import <HealthKit/HKTypeIdentifiers.h>
 #import <HealthKit/HKUnit.h>
 #import <HealthKit/HKWorkout.h>
+#import <HealthKit/HKWorkoutRoute.h>
+#import <HealthKit/HKWorkoutRouteBuilder.h>
+#import <HealthKit/HKWorkoutRouteQuery.h>
 #import <HealthKit/HKWorkoutSession.h>
Clone this wiki locally