This document explains how to configure PWAKit for your Progressive Web App, including Info.plist requirements, entitlements, and feature flags.
| File | Purpose | When Updated |
|---|---|---|
pwa-config.json |
Source of truth for app configuration | Edit manually |
Info.plist |
iOS app metadata and permissions | Sync via build script or manually |
PWAKit.entitlements |
App capabilities (push, HealthKit, etc.) | Edit for capabilities |
The primary configuration file located at kit/src/PWAKit/Resources/pwa-config.json.
{
"version": 1,
"app": {
"name": "My PWA",
"bundleId": "com.example.mypwa",
"startUrl": "https://app.example.com/"
},
"origins": {
"allowed": ["app.example.com"],
"auth": ["auth.example.com"],
"external": []
},
"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"
}
}| Field | Description | Maps To |
|---|---|---|
origins.allowed |
Domains that can load in the WebView | WKAppBoundDomains in Info.plist |
origins.auth |
OAuth/login domains (show toolbar with Done button) | WKAppBoundDomains in Info.plist |
origins.external |
Domains that open in SFSafariViewController | N/A |
Important: The origins.allowed and origins.auth arrays must be synced to WKAppBoundDomains in Info.plist. Run the sync command after changing these values:
make kit/syncThe Info.plist file is located at kit/src/PWAKit/Info.plist.
These are always required:
<key>WKAppBoundDomains</key>
<array>
<string>app.example.com</string>
<!-- Add all allowed + auth origins here -->
</array>Add these based on which features your PWA uses:
| Feature | Info.plist Key | Required When |
|---|---|---|
| Camera | NSCameraUsageDescription |
PWA uses camera/photo capture |
| Microphone | NSMicrophoneUsageDescription |
PWA records audio or video calls |
| Location | NSLocationWhenInUseUsageDescription |
PWA uses geolocation |
| Face ID | NSFaceIDUsageDescription |
features.biometrics is true |
| HealthKit | NSHealthShareUsageDescription, NSHealthUpdateUsageDescription |
features.healthkit is true |
Example privacy descriptions:
<!-- Camera - for photo/video capture -->
<key>NSCameraUsageDescription</key>
<string>Take photos and videos for your content</string>
<!-- Microphone - for audio recording, video calls -->
<key>NSMicrophoneUsageDescription</key>
<string>Record audio for voice messages</string>
<!-- Location - for geolocation features -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>Find nearby locations and provide directions</string>
<!-- Face ID - for biometric authentication -->
<key>NSFaceIDUsageDescription</key>
<string>Use Face ID to securely authenticate</string>
<!-- HealthKit - for health data access -->
<key>NSHealthShareUsageDescription</key>
<string>Read your health data to display activity information</string>
<key>NSHealthUpdateUsageDescription</key>
<string>Save workout data to the Health app</string>Required for push notifications:
<key>UIBackgroundModes</key>
<array>
<string>processing</string>
<string>remote-notification</string>
</array>The entitlements file is located at kit/src/PWAKit/PWAKit.entitlements.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Push Notifications -->
<key>aps-environment</key>
<string>development</string>
<!-- Universal Links -->
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:YOUR_DOMAIN.com</string>
</array>
<!-- HealthKit (if enabled) -->
<key>com.apple.developer.healthkit</key>
<true/>
</dict>
</plist>Required when features.notifications is true:
<key>aps-environment</key>
<string>development</string> <!-- Use "production" for App Store -->Required when features.healthkit is true:
<key>com.apple.developer.healthkit</key>
<true/>
<key>com.apple.developer.healthkit.access</key>
<array/>Required for universal link support:
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:app.example.com</string>
<string>webcredentials:app.example.com</string>
</array>For sharing data between app and extensions:
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.example.mypwa</string>
</array>| Flag | Description | Requires |
|---|---|---|
notifications |
Push notification support | aps-environment entitlement, UIBackgroundModes |
haptics |
Haptic feedback | None |
biometrics |
Face ID / Touch ID | NSFaceIDUsageDescription |
secureStorage |
Keychain storage | None |
healthkit |
HealthKit data access | HealthKit entitlement, usage descriptions |
iap |
In-App Purchases | StoreKit capability |
share |
Share sheet | None |
print |
AirPrint | None |
clipboard |
System clipboard | None |
cameraPermission |
Camera permission requests | NSCameraUsageDescription |
microphonePermission |
Microphone permission requests | NSMicrophoneUsageDescription |
locationPermission |
Location permission requests | NSLocationWhenInUseUsageDescription |
After modifying pwa-config.json, run the sync command to update the Xcode project:
make kit/syncThis command:
- Reads
origins.allowedandorigins.authfrom pwa-config.json - Updates
WKAppBoundDomainsin Info.plist - Syncs color assets and app icon
- Validates that required privacy descriptions exist for enabled features
If you prefer manual updates, ensure:
- WKAppBoundDomains contains all domains from
origins.allowed+origins.auth - Privacy descriptions exist for all features that need them
- Entitlements are configured for capabilities you use
The domain isn't in WKAppBoundDomains. Run make kit/sync or manually add it.
Missing privacy description in Info.plist. Add the appropriate NS*UsageDescription key.
- Check
aps-environmententitlement is set - Ensure
UIBackgroundModesincludesremote-notification - Verify
features.notificationsistruein pwa-config.json
- Add HealthKit entitlement
- Add both
NSHealthShareUsageDescriptionandNSHealthUpdateUsageDescription - Set
features.healthkittotruein pwa-config.json