HealthKit apps cannot import Apple Stand Hour, Apple Exercise Time, or Nike Fuel data types
| Originator: | dloewenherz |
|
| Number: | rdar://29144669 |
Date Originated: | 07-Nov-2016 03:02 PM |
| Status: | Behaves Correctly |
Resolved: | 24-Nov-2016 02:05 AM |
| Product: | iOS SDK |
Product Version: | 10.0 |
| Classification: | Bug |
Reproducible: | Always |
Summary:
See title.
Steps to Reproduce:
1. Open the attached project ("Radar7Nov2016.zip").
2. Build and run in the simulator.
Expected Results:
A HealthKit popup appears prompting the user to give permission to import Stand Hours, Exercise Time, and Nike Fuel points.
Actual Results:
The app crashes and the attached file appears in the console ("Radar7Nov2016.crash").
Version:
iOS 10.1.1
Notes:
Configuration:
iPhone SE 64GB T-Mobile
Attachments:
'Radar7Nov2016.zip' and 'Radar7Nov2016.crash' were successfully uploaded.
Duplicates
Comments
ag9zfm9wZW5yYWRhci1ocmRyEgsSBVJhZGFyGICAgIir_-kJDA
Please note:
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!
Apple Developer Relations
Engineering has provided the following feedback regarding this issue:
The sample code provided is missing the NSHealthShareUsageDescription and will also cause a crash.
“An iOS app linked on or after iOS 10.0 must include in its Info.plist file the usage description keys for the types of data it needs to access or it will crash.”
This is not the underlying issue. The issue is caused by your attempts to write to types that are not permitted.