237
app extension
also widget, share extension
A widget or a share sheet is a separate process with a small memory budget.
What is app extension?
An app extension runs outside the app: a home-screen widget, a share extension, a watch complication. It does not have the app’s memory, its running state, or its view controllers. Shared files go through an app group. A widget shows a timeline. It is not a live miniature of the app.
Why does app extension matter when vibe coding?
The draft imports the app’s root component into the widget and fetches on a timer. The extension is killed for memory, or the widget is blank because it cannot see the app’s in-memory store.
How do you do app extension?
A small target. Read a shared store in the app group. Write a timeline. Do not boot the whole app. Do not assume the app is running.
How do you ask a model for app extension?
Build (widget or share extension) as its own target. Read state from the app group, not from the app process. Stay under the memory limit. Do not import the app root.
What goes wrong with app extension?
Sharing a database without an app group. The extension and the app are looking at different files.