19.10 · Info.plist, bundle ids, app group containers and shared payloads

Most extension bugs are packaging bugs: a wrong bundle id, a missing entitlement, a plist key, a payload the older extension cannot read.

Mental model. Check the bundle, not just the code: the plist, the bundle id prefix, the entitlements and the data format are all contracts with the system.

Declaring and installing

The plist, bundle id prefix and where extensions live.

  1. What makes an extension valid inside an app bundle: the Info.plist, the bundle id prefix, and where it is installed? 19.10.1 · L3
    An extension’s Info.plist is small: the NSExtension dictionary with NSExtensionPointIdentifier (for a widget, com.apple.widgetkit-extension; a widget needs no…
  2. What does an app group look like on disk, and what happens with a group the target is not entitled to? 19.10.2 · L3
    In a built sample with the group group.com.example.bank on both the app and the widget, containerURL(forSecurityApplicationGroupIdentifier:) returned a folder…

Data contracts

Payloads that an older extension must still read.

  1. How do you make a shared payload that an older widget can still decode after the app adds a new case? 19.10.3 · L5
    The app and extension update together, but a widget can run older code than the data in the shared container (or newer), and a single new enum case makes a…

More in Extensions, widgets & intents