public override async void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); if (HKHealthStore.IsHealthDataAvailable) { var success = await HealthStore.RequestAuthorizationToShareAsync(DataTypesToWrite, DataTypesToRead); if (!success.Item1) { Console.WriteLine("You didn't allow HealthKit to access these read/write data types. " + "In your app, try to handle this error gracefully when a user decides not to provide access. " + "If you're using a simulator, try it on a device."); return; } numberFormatter = new NSNumberFormatter(); UpdateUsersAge(); UpdateUsersHeight(); UpdateUsersWeight(); } }