私は、コードを使用することによりhealthkitにカテゴリーの許可を要求しようとしています:https://www.raywenderlich.com/86336/ios-8-healthkit-swift-getting-startedから引数の型「[HKCategoryTypeは?]」期待タイプに準拠しない「ハッシュ可能」
let healthKitStore: HKHealthStore = HKHealthStore()
let healthKitTypesToWrite = Set(arrayLiteral:[
HKObjectType.categoryType(forIdentifier: HKCategoryTypeIdentifierMindfulSession)
])
healthKitStore.requestAuthorizationToShareTypes(healthKitTypesToWrite, readTypes: healthKitTypesToRead) { (success, error) -> Void in
if(completion != nil)
{
completion(success:success,error:error)
}
}
。
私がそうするときしかし、私が取得:
引数の型「[?HKCategoryType]は」期待タイプ に準拠していない私はHealthkitでカテゴリを保存するにはどうすればよい「ハッシュ可能」
HKCategoryTypeとHKCategoryTypeIdentifierMindfulSession専用のチュートリアルがありますか?