Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getSample() crashing reading Apple iWatch apple health workout entries #200

Open
hammad0316 opened this issue Dec 14, 2020 · 2 comments
Open

Comments

@hammad0316
Copy link

hammad0316 commented Dec 14, 2020

Trying to read an apple health entry that was created from an apple iWatch.

It was a workout entry with the type being dance. App just keeps crashing on reading the entry via the getSamples function.

My function call is

const options = {
        startDate,
        ascending: true,
        includeManuallyAdded: true
      };

AppleHealthKit.getSamples(
        { ...options, type: 'Workout' },
        (err, results) => {
          results?.forEach((result: any) =>
            createWorkoutEntry(result, currentUser)
          );
        }
      );

Was this a pre-existing issue or something that just started? Does anyone know how to potentially fix it?

@alexeypopovich
Copy link
Collaborator

@hammad0316 which version of apple watch and iOS do you have? Does it support electrocardiogram?

@likeaj6
Copy link

likeaj6 commented Feb 16, 2021

Having a related issue as well - this is the error message: "HKWorkoutActivityType InvalidValue"
Screen Shot 2021-02-16 at 2 49 38 PM

iOS Version:14.4

I'm importing the following types:
'Walking', 'StairClimbing', 'Running', 'Cycling', 'Workout'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants