- 在 app.json 中添加 react-native-health 的配置以启用健康 API - 在 Explore 页面中重构健康数据加载逻辑,增加加载状态提示 - 更新健康数据获取函数,增强错误处理和日志输出 - 修改 iOS 权限设置,确保健康数据访问权限的正确配置 - 更新 Info.plist 中的健康数据使用说明
51 lines
1.2 KiB
JSON
51 lines
1.2 KiB
JSON
{
|
|
"expo": {
|
|
"name": "digital-pilates",
|
|
"slug": "digital-pilates",
|
|
"version": "1.0.0",
|
|
"orientation": "portrait",
|
|
"icon": "./assets/images/icon.png",
|
|
"scheme": "digitalpilates",
|
|
"userInterfaceStyle": "automatic",
|
|
"newArchEnabled": true,
|
|
"ios": {
|
|
"supportsTablet": true,
|
|
"bundleIdentifier": "digital-pilates"
|
|
},
|
|
"android": {
|
|
"adaptiveIcon": {
|
|
"foregroundImage": "./assets/images/adaptive-icon.png",
|
|
"backgroundColor": "#ffffff"
|
|
},
|
|
"edgeToEdgeEnabled": true,
|
|
"package": "com.anonymous.digitalpilates"
|
|
},
|
|
"web": {
|
|
"bundler": "metro",
|
|
"output": "static",
|
|
"favicon": "./assets/images/favicon.png"
|
|
},
|
|
"plugins": [
|
|
"expo-router",
|
|
[
|
|
"expo-splash-screen",
|
|
{
|
|
"image": "./assets/images/splash-icon.png",
|
|
"imageWidth": 200,
|
|
"resizeMode": "contain",
|
|
"backgroundColor": "#ffffff"
|
|
}
|
|
],
|
|
[
|
|
"react-native-health",
|
|
{
|
|
"enableHealthAPI": true,
|
|
"healthSharePermission": "应用需要访问您的健康数据(步数与能量消耗)以展示运动统计。"
|
|
}
|
|
]
|
|
],
|
|
"experiments": {
|
|
"typedRoutes": true
|
|
}
|
|
}
|
|
} |