Today's Menu
Portugal
journal and plan nutrition
|
#import <Z5LocalDataController.h>
Class Methods | |
(NSString *) | + componentNameKey |
(NSString *) | + componentValueKey |
(NSString *) | + componentSampleKey |
(NSString *) | + componentAuthorityKey |
(NSString *) | + componentAuthorityDateKey |
(NSString *) | + componentHKComponentKey |
(UIColor *) | + panelBackgroundColor |
(UIColor *) | + menuHeaderBackground |
(UIColor *) | + menuContentsBackground |
(UIColor *) | + wheatBackground |
(UIColor *) | + colorForAuthority: |
(NSString *) | + captionForAuthority: |
(HKQuantity *) | + hkQuantityForString: |
Properties | |
NSManagedObjectContext * | managedObjectContext |
NSManagedObjectModel * | managedObjectModel |
NSPersistentStoreCoordinator * | persistentStoreCoordinator |
NSNumber * | usingHealthKit |
HKHealthStore * | healthStore |
NSMutableArray * | availableNutritionParamArray |
NSArray< HKQuantityTypeIdentifier > * | hkQuantityTypes |
Meal * | todaysMeal |
NSMutableArray< MenuItem * > * | todaysMenuItems |
Definition at line 22 of file Z5LocalDataController.h.
- (NSArray< HKQuantityType * > *) allHkTypes |
Definition at line 950 of file Z5LocalDataController.m.
- (NSMutableArray< NSMutableDictionary * > *) annotateAuthority: | (NSArray *) | componentArray |
Definition at line 1062 of file Z5LocalDataController.m.
|
implementation |
Returns the URL to the application's Documents directory.
Definition at line 1670 of file Z5LocalDataController.m.
- (NSNumber *) askAgain: | (HKQuantityType *) | quantityType |
Definition at line 887 of file Z5LocalDataController.m.
+ (NSString *) captionForAuthority: | (NSNumber *) | authorityValue |
Definition at line 127 of file Z5LocalDataController.m.
- (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
Definition at line 1013 of file Z5LocalDataController.m.
- (void) clearTodaysMenuItems |
Definition at line 1416 of file Z5LocalDataController.m.
+ (UIColor *) colorForAuthority: | (NSNumber *) | authorityValue |
Definition at line 104 of file Z5LocalDataController.m.
+ (NSString *) componentAuthorityDateKey |
Definition at line 80 of file Z5LocalDataController.m.
+ (NSString *) componentAuthorityKey |
Definition at line 76 of file Z5LocalDataController.m.
+ (NSString *) componentHKComponentKey |
Definition at line 84 of file Z5LocalDataController.m.
+ (NSString *) componentNameKey |
Definition at line 64 of file Z5LocalDataController.m.
+ (NSString *) componentSampleKey |
Definition at line 72 of file Z5LocalDataController.m.
+ (NSString *) componentValueKey |
Definition at line 68 of file Z5LocalDataController.m.
- (NSMutableArray *) createTodaysMenuFromUserDefaults |
this method reads the array at the proposed-menu-item-list key in the user-defaults, it can initialize a mutable global array todays-menu-items, and fills that with what it finds in user defaults. The user-defaults array at the proposed-menu-item-list key is a series of randomkeys, these are then bounced against the database to find the menu item, and the menu-item is installed in the array todays-menu-items.
Definition at line 1539 of file Z5LocalDataController.m.
- (NSSet *) dataTypesToWrite |
Definition at line 916 of file Z5LocalDataController.m.
- (Boolean) deleteEmailMessageWithFileIdentification: | (NSString *) | googlefileid |
Definition at line 1351 of file Z5LocalDataController.m.
- (void) eraseMealsThisMonthDate: | (NSDate *) | findDate |
Definition at line 358 of file Z5LocalDataController.m.
- (NSMutableArray< NSString * > *) establishNutritionParameters |
Definition at line 960 of file Z5LocalDataController.m.
|
implementation |
Definition at line 1377 of file Z5LocalDataController.m.
- (void) fetchCredentialsFromUserDefaults |
Definition at line 1267 of file Z5LocalDataController.m.
|
implementation |
Definition at line 1356 of file Z5LocalDataController.m.
|
implementation |
Definition at line 1310 of file Z5LocalDataController.m.
- (NSArray< Meal * > *) findMealsThisMonthDate: | (NSDate *) | findDate |
Definition at line 341 of file Z5LocalDataController.m.
- (NSArray< Meal * > *) findMealsWithDate: | (NSDate *) | findDate |
Definition at line 335 of file Z5LocalDataController.m.
|
implementation |
Definition at line 476 of file Z5LocalDataController.m.
|
implementation |
Definition at line 456 of file Z5LocalDataController.m.
- (MenuItem *) findNextMenuItemForGallery: | (NSNumber *) | galleryNo | |
afterPosition: | (NSNumber *) | positionInGallery | |
Definition at line 516 of file Z5LocalDataController.m.
- (EmailMessage *) findOrCreateEmailMessageWithFileIdentification: | (NSString *) | googlefileid |
Definition at line 1302 of file Z5LocalDataController.m.
- (NSArray< Meal * > *) findOrCreateMealWithDate: | (NSDate *) | findDate |
Definition at line 363 of file Z5LocalDataController.m.
- (MenuItem *) findOrCreateMenuItemWithFileIdentification: | (NSString *) | googlefileid |
Definition at line 483 of file Z5LocalDataController.m.
- (MenuItem *) findOrCreateMenuItemWithRandomkey: | (NSString *) | randomkey |
Definition at line 465 of file Z5LocalDataController.m.
- (void) getAddedAuthorizationToShare: | (NSSet *) | writeNutrTypes | |
forDelegate: | (id<Z5HealthConnectionProtocol>) | requestFrom | |
Definition at line 676 of file Z5LocalDataController.m.
|
implementation |
Definition at line 1503 of file Z5LocalDataController.m.
- (void) getHealthKitAuthorityFromUserDefaults |
Definition at line 832 of file Z5LocalDataController.m.
- (NSInteger) getNextGalleryPositionIdx |
Definition at line 529 of file Z5LocalDataController.m.
- (NSInteger) getPrevGalleryPositionIdx |
Definition at line 522 of file Z5LocalDataController.m.
- (Boolean) goHealthData: | (NSArray<NSDictionary *> *) | parametersForHK | |
forDelegate: | (id<Z5HealthConnectionProtocol>) | jingo | |
Definition at line 1102 of file Z5LocalDataController.m.
+ (HKQuantity *) hkQuantityForString: | (NSString *) | quantityDescript |
Definition at line 1232 of file Z5LocalDataController.m.
|
implementation |
Definition at line 155 of file Z5LocalDataController.m.
- (void) initGalleryPositionsRange: | (NSRange) | fetchAllRange |
Definition at line 534 of file Z5LocalDataController.m.
- (void) initializeTodaysMeal |
Definition at line 1412 of file Z5LocalDataController.m.
- (void) initNutritionTypes |
This method initializes the local-data status array, initializes array for 39 Apple health kit nutrition types.
Definition at line 705 of file Z5LocalDataController.m.
- (NSDictionary *) jsonForUsdaNumbersInMenuItem: | (MenuItem *) | menuItem |
Definition at line 601 of file Z5LocalDataController.m.
|
implementation |
Definition at line 1484 of file Z5LocalDataController.m.
- (void) logGallery: | (NSNumber *) | galleryChoice | |
caption: | (NSString *) | caption | |
Definition at line 190 of file Z5LocalDataController.m.
- (void) logTodaysMenu: | (NSString *) | caption |
Definition at line 540 of file Z5LocalDataController.m.
- (NSArray< NSDictionary * > *) mealComponents: | (Meal *) | meal |
Definition at line 1421 of file Z5LocalDataController.m.
+ (UIColor *) menuContentsBackground |
Definition at line 96 of file Z5LocalDataController.m.
+ (UIColor *) menuHeaderBackground |
Definition at line 92 of file Z5LocalDataController.m.
- (NSMutableDictionary *) mergeJsonForUsdaNumbers: | (NSDictionary *) | usdaDictionary | |
inMenuItem: | (MenuItem *) | menuItem | |
inContext: | (UIView *) | screen | |
Definition at line 574 of file Z5LocalDataController.m.
+ (UIColor *) panelBackgroundColor |
Definition at line 88 of file Z5LocalDataController.m.
- (void) putCredentialsInUserDefaults |
Definition at line 1255 of file Z5LocalDataController.m.
|
implementation |
Definition at line 819 of file Z5LocalDataController.m.
- (void) putMenuItemOnToday: | (MenuItem *) | focusMenuItem |
Definition at line 1386 of file Z5LocalDataController.m.
- (void) putTodaysMenuInUserDefaults |
Definition at line 1398 of file Z5LocalDataController.m.
|
implementation |
Definition at line 369 of file Z5LocalDataController.m.
|
implementation |
Definition at line 501 of file Z5LocalDataController.m.
|
implementation |
Definition at line 420 of file Z5LocalDataController.m.
- (NSArray *) retrieveAllEmailMessages |
Definition at line 1322 of file Z5LocalDataController.m.
- (NSArray< Meal * > *) retrieveAllMeals: | (NSNumber *) | galleryNumber |
Definition at line 347 of file Z5LocalDataController.m.
- (NSArray< MenuItem * > *) retrieveAllMenuItems: | (NSNumber *) | galleryNo |
Definition at line 494 of file Z5LocalDataController.m.
- (void) saveContext |
this method does a save on the database context, and puts menu and health-authorities into user defaults.
Definition at line 219 of file Z5LocalDataController.m.
- (void) saveQuantityToHealthStore: | (HKQuantityType *) | quantityType | |
amount: | (HKQuantity *) | quantityAmount | |
Definition at line 1162 of file Z5LocalDataController.m.
- (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.
Definition at line 663 of file Z5LocalDataController.m.
- (void) setUseHealthKit: | (Boolean) | useHealthKit |
This gets called when "Apple HealthKit" gets pushed, and status toggles 'on' gets toggled on
Definition at line 642 of file Z5LocalDataController.m.
- (void) todaysMealConsumed: | (NSDate *) | date | |
forDelegate: | (id<Z5HealthConnectionProtocol>) | jingo | |
Definition at line 388 of file Z5LocalDataController.m.
- (void) todaysMealRated: | (float) | rating |
Definition at line 407 of file Z5LocalDataController.m.
- (void) todaysMealRequested: | (NSDate *) | date |
Definition at line 375 of file Z5LocalDataController.m.
- (void) todaysMealSkipped |
Definition at line 413 of file Z5LocalDataController.m.
- (NSArray< NSDictionary * > *) todaysMenuComponents |
Definition at line 1433 of file Z5LocalDataController.m.
- (NSDate *) toLocalTime: | (NSDate *) | grenwich |
Definition at line 425 of file Z5LocalDataController.m.
|
implementation |
Definition at line 1153 of file Z5LocalDataController.m.
- (NSArray< HKQuantityType * > *) typesForWriting |
Definition at line 936 of file Z5LocalDataController.m.
|
implementation |
Definition at line 560 of file Z5LocalDataController.m.
|
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.
Definition at line 763 of file Z5LocalDataController.m.
+ (UIColor *) wheatBackground |
Definition at line 100 of file Z5LocalDataController.m.
|
readwritenonatomicstrong |
Definition at line 30 of file Z5LocalDataController.h.
|
readwritenonatomicassign |
Definition at line 29 of file Z5LocalDataController.h.
|
readwritenonatomicstrong |
Definition at line 32 of file Z5LocalDataController.h.
|
readnonatomicstrong |
Returns the managed object context for the application. If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application.
Definition at line 24 of file Z5LocalDataController.h.
|
readnonatomicstrong |
Returns the managed object model for the application. If the model doesn't already exist, it is created from the application's model.
Definition at line 25 of file Z5LocalDataController.h.
|
readnonatomicstrong |
Returns the persistent store coordinator for the application. If the coordinator doesn't already exist, it is created and the application's store added to it.
Definition at line 26 of file Z5LocalDataController.h.
|
readwritenonatomicstrong |
Definition at line 34 of file Z5LocalDataController.h.
|
readwritenonatomicstrong |
Definition at line 92 of file Z5LocalDataController.h.
|
readnonatomicstrong |
Definition at line 28 of file Z5LocalDataController.h.