ios_specific_csx

Last updated:

0 purchases

ios_specific_csx Image
ios_specific_csx Images
Add to Cart

Description:

ios specific csx

ios_specific_csx #
旨在专注于iOS特有方面的插件开发
1. Health App 更新和获取数据 #
项目配置 #
主项目的info.plist引入权限配置描述信息
<key>NSHealthShareUsageDescription</key>
<string>用于更新用户的正念训练时间</string>
<key>NSHealthUpdateUsageDescription</key>
<string>用于更新用户的正念训练时间</string>
copied to clipboard

在项目中添加HealthKit的capability并勾选(这里还需要生成相应的配置文件和相关的证书,自动签名的话可以忽略这里的提醒证书配置问题)

插件代码使用方法 #
//引入头文件
import 'package:ios_specific_csx/ios_specific_csx.dart';
copied to clipboard
1.加入到健康的正念训练
//添加正念时长,返回结果:是否成功,以及失败的原因
IosSpecificCsx.addHealthMindfulness(
DateTime(2021, 3, 26, 14, 10),
DateTime(2021, 3, 26, 14, 20))
.then((result) {
print('mindfulness加入结果:${result.toJson()}');
});
copied to clipboard
//获取健康正念的操作权限
IosSpecificCsx.getHealthAuthorityStatus(
HealthAppSubclassification.Mindfulness)
.then((result) {
print('mindfulness权限:$result');
});
copied to clipboard
2. #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.