Today's Menu  Portugal
journal and plan nutrition
Instance Methods | Class Methods | Properties | List of all members
Z4HealthDataController Class Reference

#import <Z4HealthDataController.h>

Inheritance diagram for Z4HealthDataController:
Inheritance graph
[legend]
Collaboration diagram for Z4HealthDataController:
Collaboration graph
[legend]

Instance Methods

(void) - initNutritionTypes
 
(NSArray< HKQuantityType * > *) - typesForWriting
 
(NSArray< HKQuantityType * > *) - allHkTypes
 
(void) - setUseHealthKit:
 
(void) - setupHealthKit
 
(void) - getAddedAuthorizationToShare:forDelegate:
 
(NSSet *) - dataTypesToWrite
 
(NSNumber *) - checkTypeAuthorization:
 
(NSNumber *) - askAgain:
 
(NSMutableArray *) - establishNutritionParameters
 
(Boolean) - goHealthData:forDelegate:
 
(void) - saveQuantityToHealthStore:amount:
 
(NSMutableArray *) - annotateAuthority:
 
(void) - getHealthKitAuthorityFromUserDefaults
 
(void) - putHealthKitAuthorityInUserDefaults
 
(id) - init [implementation]
 
(void) - validateHealthKitAuthority [implementation]
 
(void) - tryHealthStore: [implementation]
 

Class Methods

(NSString *) + componentNameKey
 
(NSString *) + componentValueKey
 
(NSString *) + componentSampleKey
 
(NSString *) + componentAuthorityKey
 
(NSString *) + componentAuthorityDateKey
 
(NSString *) + componentHKComponentKey
 
(UIColor *) + colorForAuthority:
 
(NSString *) + captionForAuthority:
 
(HKQuantity *) + hkQuantityForString:
 

Properties

HKHealthStore * healthStore
 
NSMutableArray * availableNutritionParamArray
 
NSNumber * usingHealthKit
 
NSArray< HKQuantityTypeIdentifier > * hkQuantityTypes
 

Method Documentation

◆ allHkTypes()

- (NSArray< HKQuantityType * > *) allHkTypes

◆ annotateAuthority:()

- (NSMutableArray< NSMutableDictionary * > *) annotateAuthority: (NSArray *)  componentArray

◆ askAgain:()

- (NSNumber *) askAgain: (HKQuantityType *)  quantityType

◆ captionForAuthority:()

+ (NSString *) captionForAuthority: (NSNumber *)  authorityValue

◆ checkTypeAuthorization:()

- (NSNumber *) checkTypeAuthorization: (HKQuantityType *)  quantityType

I would like to know when the authorization was originalley set/changed Where do I get previous authority - pipeline from user-defulats

◆ colorForAuthority:()

+ (UIColor *) colorForAuthority: (NSNumber *)  authorityValue

◆ componentAuthorityDateKey()

+ (NSString *) componentAuthorityDateKey

◆ componentAuthorityKey()

+ (NSString *) componentAuthorityKey

◆ componentHKComponentKey()

+ (NSString *) componentHKComponentKey

◆ componentNameKey()

+ (NSString *) componentNameKey

◆ componentSampleKey()

+ (NSString *) componentSampleKey

◆ componentValueKey()

+ (NSString *) componentValueKey

◆ dataTypesToWrite()

- (NSSet *) dataTypesToWrite

◆ establishNutritionParameters()

- (NSMutableArray< NSString * > *) establishNutritionParameters

◆ getAddedAuthorizationToShare:forDelegate:()

- (void) getAddedAuthorizationToShare: (NSSet *)  writeNutrTypes
forDelegate: (id<Z5HealthConnectionProtocol>)  requestFrom 

◆ getHealthKitAuthorityFromUserDefaults()

- (void) getHealthKitAuthorityFromUserDefaults

◆ goHealthData:forDelegate:()

- (Boolean) goHealthData: (NSArray<NSDictionary *> *)  parametersForHK
forDelegate: (id<Z5HealthConnectionProtocol>)  jingo 

◆ hkQuantityForString:()

+ (HKQuantity *) hkQuantityForString: (NSString *)  quantityDescript

◆ init()

- (id) init
implementation

◆ initNutritionTypes()

- (void) initNutritionTypes

This method initializes the local-data status array, initializes array for 39 Apple health kit nutrition types.

◆ putHealthKitAuthorityInUserDefaults()

- (void) putHealthKitAuthorityInUserDefaults

◆ saveQuantityToHealthStore:amount:()

- (void) saveQuantityToHealthStore: (HKQuantityType *)  quantityType
amount: (HKQuantity *)  quantityAmount 

◆ setupHealthKit()

- (void) setupHealthKit

Eventually this next method will be the front door to kit . Called at NutritionGallery.viewDidLoad, and "Apple HealthKit" button hit, and state toggled on. Modification: before I call validateHealthKitAuthority I have to ask to share. The validateAuthority only reflects asked for values.

◆ setUseHealthKit:()

- (void) setUseHealthKit: (Boolean)  useHealthKit

This gets called when "Apple HealthKit" gets pushed, and status toggles 'on' gets toggled on

◆ tryHealthStore:()

- (void) tryHealthStore: (id)  arg
implementation

◆ typesForWriting()

- (NSArray< HKQuantityType * > *) typesForWriting

◆ validateHealthKitAuthority()

- (void) validateHealthKitAuthority
implementation

This method makes thirty-nine calls to the health-store, 'authorizationStatusForType', to determine which parameters can be recorded in the HealthStore. The authorization status for an HKObjectType does not reflect whether your application has authorization to read samples of those types. It only indicates whether you have requested authorization at all and whether your app is authorized to write samples of those types. So if your app requests authorization to read step count samples but not write them, and the user grants read authorization, then the authorization status for HKQuantityTypeIdentifierStepCount will be HKAuthorizationStatusSharingDenied.

Property Documentation

◆ availableNutritionParamArray

- (NSMutableArray*) availableNutritionParamArray
readwritenonatomicstrong

◆ healthStore

- (HKHealthStore*) healthStore
readwritenonatomicassign

◆ hkQuantityTypes

- (NSArray<HKQuantityTypeIdentifier>*) hkQuantityTypes
readwritenonatomicstrong

◆ usingHealthKit

- (NSNumber*) usingHealthKit
readnonatomicstrong

The documentation for this class was generated from the following files: