[英]How do i write Blood Type in Health kit in iOS
我已经正确设置了HKHealthStore对象,并且现在尝试编写用户特征(即出生日期,生物性别,血液类型和Fitzpatrick皮肤类型)。 我在HKQuantityTypeForIdentifier
找不到该类型。 如何在Objective-C
中将血型写入HealthKit? 我正在尝试以下方法:
int Dateofbirth=20-10-1995;
NSLog(@“%d”, Dateofbirth);
sex=gender;
BloodType= A+ve;
Fitzpatrick Skin Type= something;
HKQuantityType* bodytemp = [HKQuantityType quantityTypeForIdentifier: HKQuantityTypeIdentifier];
您可能必须将HKBloodType
与HKBloodType
characteristicTypeForIdentifier:
一起HKBloodType
。
血型常数:
typedef enum : NSInteger {
HKBloodTypeNotSet = 0,
HKBloodTypeAPositive,
HKBloodTypeANegative,
HKBloodTypeBPositive,
HKBloodTypeBNegative,
HKBloodTypeABPositive,
HKBloodTypeABNegative,
HKBloodTypeOPositive,
HKBloodTypeONegative,
} HKBloodType;
没有用于修改用户特征的API。 用户必须自己在“运行状况”中更新特征。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.