feat(health): 统一使用共享的HealthKit权限初始化方法并简化配置

将sleepHealthKit模块中的HealthKit权限初始化逻辑替换为使用health工具中的通用ensureHealthPermissions方法,移除重复的权限配置代码。同时更新后台任务标识符以保持一致性。
This commit is contained in:
richarjiang
2025-09-12 15:54:33 +08:00
parent 1b76cc305a
commit edac180dd6
4 changed files with 19 additions and 48 deletions

View File

@@ -6,7 +6,7 @@ import * as BackgroundTask from 'expo-background-task';
import * as TaskManager from 'expo-task-manager';
import { TaskManagerTaskBody } from 'expo-task-manager';
export const BACKGROUND_TASK_IDENTIFIER = 'com.expo.modules.backgroundtask.processing';
export const BACKGROUND_TASK_IDENTIFIER = 'backgroundtask';