feat(salud): iOS suma activas + basal (paridad de "Calorías quemadas" con Android) - #10
Merged
Merged
Conversation
…Android) HealthKit no tiene un tipo "total" único como Health Connect, así que se leen HKActiveEnergyBurned + HKBasalEnergyBurned y se suman → "Calorías quemadas" = total, como en Android. CALORIES_BURNED ahora pide ambos permisos (activa y basal / "Resting Energy"). Smoke-test en simulador: compila, lanza y solicita el permiso basal; el número no es verificable sin datos reales (Google Health no sincroniza con Apple Health).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Paridad de iOS con Android en "Calorías quemadas": ahora iOS muestra el total (activas + basal), no solo las activas.
Contexto
HealthKit no tiene un tipo "total" único como
TotalCaloriesBurnedRecordde Health Connect. iOS leía soloHKActiveEnergyBurned, pero el card se llama "Calorías quemadas" (total). Quedaba sub-reportando (~1700 kcal de basal ignoradas).Cambio
readEnergy(identifier)parametrizado; se leenHKActiveEnergyBurned+HKBasalEnergyBurnedy se suman → total, como Android.CALORIES_BURNEDahora pide ambos permisos (activa y basal / "Resting Energy") víatoHKTypes()(un permiso → varios tipos).Verificación (simulador iOS)