Skip to content

Full pwa-config.json

This page documents the full schema in one place.

Complete example

json
{
  "version": 1,
  "app": {
    "name": "My App",
    "bundleId": "com.example.myapp",
    "startUrl": "https://app.example.com/"
  },
  "origins": {
    "allowed": ["app.example.com", "*.example.com"],
    "auth": ["accounts.google.com"],
    "external": ["example.com/docs/*"]
  },
  "features": {
    "notifications": true,
    "haptics": true,
    "biometrics": true,
    "secureStorage": true,
    "healthkit": false,
    "iap": false,
    "share": true,
    "print": true,
    "clipboard": true,
    "cameraPermission": true,
    "microphonePermission": true,
    "locationPermission": true
  },
  "appearance": {
    "displayMode": "standalone",
    "pullToRefresh": false,
    "statusBarStyle": "adaptive",
    "orientationLock": "any",
    "backgroundColor": "#FFFFFF",
    "themeColor": "#007AFF"
  },
  "notifications": {
    "provider": "apns"
  }
}

Top-level fields

FieldRequiredNotes
versionYesCurrent schema version is 1
appYesName, bundle ID, start URL
originsYesURL routing behavior
featuresNoIf omitted, runtime defaults apply
appearanceNoIf omitted, runtime defaults apply
notificationsNoIf omitted, runtime default is APNs

app

FieldRequiredValidation
nameYesNon-empty string
bundleIdYesReverse-domain format
startUrlYesMust be HTTPS

origins

FieldRequiredDefaultNotes
allowedYes-Must not be empty
authNo[]OAuth/login flow domains
externalNo[]Force external browser

Pattern examples:

  • example.com
  • *.example.com
  • example.com/path/*

features

KeyRuntime default (if omitted)
notificationstrue
hapticstrue
biometricstrue
secureStoragetrue
healthkitfalse
iapfalse
sharetrue
printtrue
clipboardtrue
cameraPermissiontrue
microphonePermissiontrue
locationPermissiontrue

Important: CLI-generated config explicitly writes feature values based on your init choices.

appearance

FieldAllowed valuesRuntime default
displayModestandalone, fullscreenstandalone
pullToRefreshtrue, falsefalse
statusBarStyleadaptive, light, darkadaptive
orientationLockany, portrait, landscapeany
backgroundColorstring (#RRGGBB)null
themeColorstring (#RRGGBB)null

notifications

FieldAllowed valuesRuntime default
providerapnsapns

Validate + sync

bash
cat src/PWAKit/Resources/pwa-config.json | python3 -m json.tool
npx @pwa-kit/cli sync --validate
npx @pwa-kit/cli sync

Released under the MIT License.