Hi I'm writing a Fitness App which gets its Data from Apples Health app.
So far so good.
Problem: in Health app it is possible to make manually data entries which makes it possible to cheat.
Question: how can i exclude or ignore this specific Data Entries.
Just the Data with "Source: Health" so i've still the possibility to read data from a random Fitness tracker.
There's no master setting to stop Apple Health collecting data from your devices once you've turned it on, but you can effectively stop it by blocking its access to the sensors in your phone. From iOS Settings, tap Privacy, then Motion & Fitness, then turn off the Fitness Tracking option.
Stop sharing health dataOn your iPhone, open the Health app. Tap Sharing. Select an individual or provider under You're Sharing With. Turn off a health topic to stop sharing that data.
To stop storing your Health data in iCloud, go to Settings > [your name] > iCloud and turn off Health. Health data from Family Setup devices are also backed up directly to iCloud.
Samples in HealthKit that were manually entered by the user will have have a YES value for the HKMetadataKeyWasUserEntered
metadata key. To create a predicate that matches only samples that were not user-entered, you could do use the following:
[NSPredicate predicateWithFormat:@"metadata.%K != YES", HKMetadataKeyWasUserEntered];
Note that this must be formulated as value != YES
because the value for the key could be YES, NO, or nil and nil implies NO.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With