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.
- What makes an extension valid inside an app bundle: the Info.plist, the bundle id prefix, and where it is installed?
An extension’s Info.plist is small: the NSExtension dictionary with NSExtensionPointIdentifier (for a widget, com.apple.widgetkit-extension; a widget needs no… - What does an app group look like on disk, and what happens with a group the target is not entitled to?
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.
- How do you make a shared payload that an older widget can still decode after the app adds a new case?
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
- 19.1 · Extension processes, limits, and sharing data with the app
- 19.2 · Notification Service and Notification Content extensions
- 19.3 · Share, Action, keyboards, message filtering, web extensions and network extensions
- 19.4 · WidgetKit timelines, families, refresh budgets, interactivity and controls
- 19.5 · App Intents, Shortcuts, Siri and Spotlight
- 19.6 · The watch app model, Watch Connectivity, and complications
- 19.7 · Top Shelf on tvOS, and treating extensions as a product API
- 19.8 · Timeline fallbacks, testing, bundles and rendering modes
- 19.9 · Dependencies, entities and queries, errors, and build-time metadata