fix(ios): 修复HealthKit类型安全性并优化HRV通知频率

将HealthKit数据类型从强制解包改为可选类型,避免潜在的运行时崩溃。所有数据类型访问现在都通过guard语句进行安全检查,当类型不可用时返回明确的错误信息。同时修复了活动摘要日期计算错误,确保每个摘要使用正确的日期。

HRV压力通知的最小间隔从4小时缩短至2小时,并移除了每日一次的限制,允许更及时的压力状态提醒。

BREAKING CHANGE: HealthKit数据类型API现在可能返回"TYPE_NOT_AVAILABLE"错误,调用方需要处理此新错误类型
This commit is contained in:
richarjiang
2025-11-19 09:23:42 +08:00
parent 9d424c7bd2
commit f43cfe7ac6
3 changed files with 170 additions and 68 deletions

View File

@@ -27,7 +27,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0.26</string>
<string>1.0.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>