Code samples for HKWorkout do not run in Xcode 9 or Swift 4
| Originator: | dloewenherz | ||
| Number: | rdar://32740273 | Date Originated: | June 13 2017, 11:20 AM |
| Status: | Open | Resolved: | |
| Product: | Documentation | Product Version: | |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
See title.
Steps to Reproduce:
1. Navigate to https://developer.apple.com/documentation/healthkit/hkworkout#1664264.
2. Copy and paste this code sample into Xcode 9 (also attached to this bug report), and define the following variables before the code sample.
let healthStore = HKHealthStore()
let start = Date()
let end = Date()
let intervals = [start, end]
Expected Results:
There are no compilation, type-checking, or syntax errors.
Observed Results:
The code does not run.
Version:
Notes:
Configuration:
Comments
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!