Skip to content

iOS Modules

These APIs are namespaced under ios.*.

Biometrics (ios.biometrics)

MethodReturns
isAvailable()Promise<{ available: boolean; biometryType; error? }>
authenticate(reason)Promise<{ success: boolean; error? }>

Secure Storage (ios.secureStorage)

MethodReturns
set(key, value)Promise<void>
get(key)Promise<string | null>
delete(key)Promise<void>
has(key)Promise<boolean>

HealthKit (ios.healthKit)

MethodReturns
isAvailable()Promise<{ available: boolean }>
requestAuthorization(request)Promise<{ success: boolean; error? }>
querySteps(options)Promise<HealthSample[]>
queryStepCount(options)Promise<{ totalSteps: number }>
queryHeartRate(options)Promise<HealthSample[]>
queryWorkouts(options)Promise<WorkoutData[]>
querySleep(options)Promise<SleepSample[]>
saveWorkout(request)Promise<{ success: boolean; error?: string }>

options requires startDate and endDate (ISO 8601).

Example:

ts
import { ios } from "@pwa-kit/sdk";

const steps = await ios.healthKit.queryStepCount({
  startDate: "2026-03-01T00:00:00Z",
  endDate: "2026-03-02T00:00:00Z"
});

StoreKit (ios.storeKit)

MethodReturns
getProducts(productIds)Promise<ProductInfo[]>
purchase(productId)Promise<PurchaseResult>
restore()Promise<void>
getEntitlements()Promise<{ ownedProductIds: string[] }>
isOwned(productId)Promise<boolean>

App (ios.app)

MethodReturns
getVersion()Promise<{ version; build; pwaKitVersion }>
requestReview()Promise<{ presented: boolean }>
openSettings()Promise<void>

Local Notifications (ios.notifications)

MethodReturns
schedule(options)Promise<string> (notification id)
cancel(id)Promise<void>
cancelAll()Promise<void>
getPending()Promise<PendingNotification[]>

schedule requires id, title, and trigger.

ts
await ios.notifications.schedule({
  id: "daily-checkin",
  title: "Daily check-in",
  trigger: {
    type: "calendar",
    hour: 9,
    minute: 0,
    repeats: true
  }
});

Released under the MIT License.