PAM Native Health
Start here
Section titled “Start here”Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | shpam doctorpam init my-app --template nativecd my-apppam composer require pushinbr/pam-native-healthpam doctorpam native dev$health = new Health();$types = [HealthDataType::Steps, HealthDataType::HeartRate];
$health->requestAuthorization($types, [], function (bool $granted, ?string $error) use ($health): void { if (!$granted) return; $health->read( HealthDataType::Steps, (time() - 86400) * 1000, time() * 1000, fn (array $samples) => renderDailySteps($samples), );});Health checks availability, requests authorization, and reads/writes samples.
HealthDataType, HealthSample, and HealthAvailability provide typed
cross-platform contracts.
HealthKit intentionally does not reveal denied read access, so
needsAuthorization() avoids claiming permission is granted; empty reads may
mean no data or no accessible data. Request only current-feature types, explain
value before system UI, minimize retention, exclude samples from logs/analytics,
and certify physical devices.
Support: PAM Native 0.6.x, Android API 26+ with Health Connect 1.1, iOS 15+.
HealthPluginProvider registers the module through PAM plugin discovery.