feat: 集成健康数据功能优化

- 在 app.json 中添加 react-native-health 的配置以启用健康 API
- 在 Explore 页面中重构健康数据加载逻辑,增加加载状态提示
- 更新健康数据获取函数,增强错误处理和日志输出
- 修改 iOS 权限设置,确保健康数据访问权限的正确配置
- 更新 Info.plist 中的健康数据使用说明
This commit is contained in:
richarjiang
2025-08-12 10:50:37 +08:00
parent e87dc87e1b
commit 456f0d93ce
6 changed files with 174 additions and 84 deletions

View File

@@ -28,7 +28,7 @@
<key>CFBundleURLSchemes</key>
<array>
<string>digitalpilates</string>
<string>com.anonymous.digitalpilates</string>
<string>digital-pilates</string>
</array>
</dict>
</array>
@@ -45,14 +45,14 @@
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSHealthShareUsageDescription</key>
<string>应用需要访问您的健康数据(步数与能量消耗)以展示运动统计。</string>
<key>NSHealthUpdateUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to update health info</string>
<key>NSUserActivityTypes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
</array>
<key>NSHealthShareUsageDescription</key>
<string>应用需要访问您的健康数据(步数与能量消耗)以展示运动统计。</string>
<key>NSHealthUpdateUsageDescription</key>
<string>应用需要写入健康数据以提供更准确的统计。</string>
<key>UILaunchStoryboardName</key>
<string>SplashScreen</string>
<key>UIRequiredDeviceCapabilities</key>