Guide

Apple data transport

The host writes widget data through one transport. Leave transport unset and the plugin picks the one that works for a normal build:

PlatformDefaultWhy
macOSwidgetContainerThe widget extension is sandboxed. A Developer ID or ad-hoc build has no provisioning profile, so the extension cannot open a group.* container. The host (not sandboxed) writes straight into the extension's own container.
iOSappGroupThe only channel iOS has.
Android, Windows, Linuxnot used

Set it only for a sandboxed macOS host (Mac App Store), where the App Group is backed by a provisioning profile:

{
  "plugins": {
    "widgets": {
      "transport": "appGroup"
    }
  }
}
transportHost write pathRequirements
widgetContainer~/Library/Containers/<appex>/Data/widget_data.jsonmacOS host not sandboxed (Tauri default); ad-hoc or Developer ID
appGroupcontainerURL(group)/widget_data.jsonApp Group authorized by a provisioning profile on app + extension (iOS, Mac App Store)
userDefaultsApp Group UserDefaults suiteSame as appGroup
autoOne-shot probe, then latchDevelopment only — never ship this

extensionBundleId defaults to <identifier>.widgetkit (what init-macos creates).

Override without editing conf: WIDGET_TRANSPORT=widgetContainer.

The widget extension still reads all channels and picks the freshest map (so it can find data wherever the host wrote). Host-side writes use only the configured driver. Render receipts feed getWidgetDiagnostics, not transport selection.

setItems skips disk I/O when the value is unchanged (no nonce bump).

App Groups & signing (plugin consumers)

For live widgets that share data with the host you need the same App Group id in four places, plus a Team ID that actually owns that group.

PlaceWhat to set
Apple Developer → IdentifiersApp Group + both App IDs with App Groups capability
Xcode Signing & Capabilities (app + widget targets)Same group checked
plugins.widgets.appGroup in tauri.conf.jsonSame string
JS setWidgetConfig(config, group, …)Same string as group

Swift TauriWidgetProvider(appGroup:widgetId:) must use that group too (CLI templates fill it).

Register on the Developer portal

You need Account Holder or Admin on the team that signs the app (the Team ID in Xcode / bundle.iOS.developmentTeam).

  1. Identifiers → + → App Groups
    Identifier like group.com.example.myapp (reverse-DNS). Register.
  2. Identifiers → + → App IDs (type App) for the main bundle, e.g. com.example.myapp
    Enable App Groups → Configure → tick your group → Save.
  3. Repeat for the widget bundle, e.g. com.example.myapp.WidgetExtension
    Same App Groups tick → Save.
  4. In Xcode, set Team on both targets, Automatic signing, and add the App Groups capability if it is not already there.

Then pin config:

{
  "plugins": {
    "widgets": {
      "appGroup": "group.com.example.myapp",
      "transport": "appGroup"
    }
  },
  "bundle": {
    "iOS": {
      "developmentTeam": "YOUR_TEAM_ID"
    }
  }
}

iOS uses appGroup (the default there). macOS Developer ID and ad-hoc builds use widgetContainer (the default there); appGroup on macOS only for a sandboxed Mac App Store host (macOS setup).

“Identifier is not available”

If the portal says An Application Group with Identifier '…' is not available:

  • The id is already registered on another team (or another Apple ID). You cannot recreate it under this team.
  • Either switch Xcode / developmentTeam to the team that owns the group, or register a new unique id (e.g. group.com.example.myapp2) and update conf, entitlements, Swift, and JS together.

Confirm you are editing Identifiers for the same team as DEVELOPMENT_TEAM / bundle.iOS.developmentTeam.

Signing cheat sheet

HostSigningtransport
iOS device / TestFlightApple Development or Distribution + Team IDappGroup
iOS SimulatorDevelopment / AutomaticappGroup (portal group still required for Automatic profiles with the entitlement)
macOS, Developer ID or ad-hoc (-)Host not sandboxedwidgetContainer (default)
macOS, Mac App StoreSandboxed host, provisioning profileappGroup

List identities (or use the CLI):

npx tauri-widgets signing
security find-identity -v -p codesigning

For CI / local env vars used by Tauri Apple builds (APPLE_DEVELOPMENT_TEAM, optional ASC API key), keep secrets out of git. Unset APPLE_API_KEY / APPLE_API_ISSUER / APPLE_API_KEY_PATH when running tauri ios build if you need real codesign — with those set, tauri-cli may stamp a dummy identity.

Sanity check

npx tauri-widgets doctor
# or: pnpm tauri-widgets doctor /path/to/your-app

Checks conf ↔ entitlements ↔ project mentions of the App Group, and (when a built .app exists) ad-hoc vs Team ID mismatches. Details: Doctor.

Platform walkthroughs: iOS setup · macOS setup.