0
Xcode 6からXcode 7に変換したときに、HKストアの読み書きが次の行に「より多くのコンテキストなしで式の型があいまいです」というエラーが表示されました。 'let healthKitTypesToRead = Set(arrayLiteral:[' and 'let healthKitTypesToWrite =セット(配列リテラルは:[」私はこの赤い警告エラーを修正する、または別のコードを書くことができますどのようにヘルスキットへの読み書きはXcode 7に変換されませんでした: '式のタイプがより多くのコンテキストなしで曖昧です'エラーを修正するには?
// 1. Set the types you want to read from HK Store
let healthKitTypesToRead = Set(arrayLiteral:[
HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierHeartRate),
HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierActiveEnergyBurned),
])
// 2. Set the types you want to write to HK Store
let healthKitTypesToWrite = Set(arrayLiteral:[
HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierActiveEnergyBurned),
])
はHKストアに読み取り/書き込みに