- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我想使用后台提取在后台提取 HealthStore 数据,但我不断收到错误消息:Error Domain=com.apple.healthkit Code=6 "Protected health data is inaccessible"UserInfo=0x17026fdc0 {NSLocalizedDescription=Protected无法访问健康数据
。
Apple 声明:
Because the HealthKit store is encrypted, your app cannot read data from the store when the phone is locked. This means your app may not be able to access the store when it is launched in the background.
有什么解决方法可以在后台访问数据吗? HKObserverQuery
是后台获取数据的唯一方式吗?
最佳答案
正如您引用的文档中所述,手机处于锁定状态时无法访问 HealthKit 数据。但是,如果手机已解锁并且您的应用程序在后台运行,您就可以访问数据。因此,如果在手机解锁时发生后台提取,您将能够访问数据。
关于ios - HealthKit 数据在后台无法访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30361033/
我不知道如何获得“添加到健康的日期”?我无法从 HKSample 找到有关“添加到健康的日期”的一些信息。 任何人都可以帮助我吗? HKSample : HKObject open var s
昨天苹果宣布了他们的 health records API . documentation for it指出: ...clinical records are read-only, so you ca
我在我的 iOS Swift 应用程序中添加 HealthKit 代码,但出现错误: /* Ask for permission to access the health store */ overr
我的 watch 应用程序能够轻松地从 HealthKit 的 HKAnchoredObjectQuery 中的新 updateHandler 读取新的心率数据。 问题是,手机应用程序观察到的健康商店
尝试使用 HealthKit API 授权时,我们在某些设备上遇到错误。对 [HKHealthStore requestAuthorizationToShareTypes:::] 的调用始终失败并出现
我正在尝试做一个非常基本的事情:设置一个HKObserverQuery,以便我可以知道何时更改了各个数据点(我已确保用户已授权该应用程序使用所涉及的数据点。) ,我可以使查询在每次启动该应用程序时触发
我正在尝试制作一个基本脚本,从 iOS 上的 HealthKit 中提取我的每日步数,但是当触发页面时 - 什么也没有发生。它应该请求读取 HealthKit 数据的权限,但我不知道哪里出了问题。 这
我有一个 Watch-App,几周前创建了一个分发配置文件,有一个启用 HealthKit 的选项。 现在发现我不需要Watch App中的HealthKit。(因此没有在 WatchKit Exte
我正在使用 HealthKit 在我的应用程序中显示步骤,但它非常延迟。我正在使用其他实时显示步骤的应用程序,但感觉 HealtKit 有几分钟的延迟? 这是接收步骤的代码: func querySt
大家好,有人知道如何从 HealthKit 获取锻炼数据吗?我在本教程中看到了http://www.raywenderlich.com/89733/healthkit-tutorial-with-sw
在我的应用程序中,我想每天对两个数量的 ActiveEnergyBurned 和 BasalEnergyBurned 求和并显示出来。是否可以使用单个 HKQuery 来执行此操作?还是我必须单独获取
我已经在委托(delegate)的 didFinishLaunching 方法中注册了四种类型的 HealthKit 数据的后台传送。数据类型为步数、 sleep 、锻炼和energyConsumed
我正在尝试从用户的设备获取每天的平均心率。我有下面的代码,在调用时打印“avgHeart”,但不执行任何其他操作。 我正在自己的手机上进行测试,手机上肯定有心率数据,并且已被授权读取心率数据。 fun
我一直在寻找这个问题的答案,但找不到任何好的线索。我制作了一个药物应用程序,希望能够将药物数据推送到 HealthKit 应用程序。这个功能现在可用吗? 最佳答案 HealthKit 目前不支持药物。
我有一个应用程序可以从 Strava、Runkeeper 和其他几个健康应用程序读取数据。现在我计划将 HealthKit 集成到我的应用程序中并从那里读取数据。 我担心的是数据的重复性。也就是说,S
我在尝试集成 HealthKit 时收到“未找到匹配的配置文件”错误。我已经添加了 HealthKit 权利。我已经重新生成证书并尝试过,但仍然出现错误。项目和目标都选择了相同的证书。我在 Xcode
我正在尝试将一些数据保存到 HealthKit。为每个项目发送一个 UUID。它是一个转换成字符串的 NSUUID。 hk_acceptsMetadataValue:]: unrecognized s
我一直在尝试在手机上查询 HealthKit 的步数。这是我尝试过的: let endDate = NSDate() let startDate = NSCalendar.curren
用户的健康相关数据属于隐私事项,需要非常安全,即需要将其存储在安全的地方。例如,当我观看苹果关于指纹解锁的官方视频时,他们告诉我指纹数据存储在无法破解的地方。因此,出于好奇,我想到了一个问题:这些数据
创建HKObject后,有什么方法可以修改其中的元数据吗?我知道我们可以在创建期间修改元数据(NSdictionary),但如果我需要在之后添加额外的数据怎么办? 最佳答案 存储在 HealthKit
我是一名优秀的程序员,十分优秀!