jonny2027 / Swift-3.0-HealthKit

Accessing Healthkit information for iOS in Swift 3.0
MIT License
2 stars 0 forks source link

Type 'Calendar' has no member 'Unit' #1

Open graffixnyc opened 7 years ago

graffixnyc commented 7 years ago

Am getting this error on the line:

let yesterday = calendar.date(byAdding: Calendar.Unit.hour, value: -15, to: Date(), options: [])

I'm very new to Swift so I'm not sure how to correct it.

Downloads/Swift-3.0-HealthKit-master/HealthKitTest/Classes/ViewController.swift:74:49: Type 'Calendar' has no member 'Unit'

jonny2027 commented 7 years ago

Sorry this was beta code. I will try to look into this now but dont do iOS dev any more i have moved into game development so need to boot up my mac