Functionality outside your application.
WHAT AN EXTENSION IS
A separate executable, bundled with your application, running in another context.
WHAT KINDS EXIST
Share extensions, appearing in the share sheet Action extensions, transforming content Widgets Notification content and service extensions Keyboards File provider extensions Intents, for voice and shortcuts Safari extensions
WHAT THEY SHARE WITH THE APPLICATION
Nothing automatically.
WHY THAT SURPRISES PEOPLE
They are separate processes, with their own memory and their own container.
WHAT THEY ARE CONSTRAINED BY
Tight memory limits Short execution time Restricted capabilities
WHAT HAPPENS WHEN LIMITS ARE EXCEEDED
The extension is terminated, frequently without a useful message.
WHAT TO DO ABOUT THAT
Keep them small, and do heavy work in the application.
WHAT TO SHARE CODE THROUGH
A framework or package used by both.
WHAT TO NEVER DO
Duplicate logic between application and extension.
WHAT TO TEST
Under memory pressure, on an older device.