I. What is an application extension?
An application extension is not an app, it isa separate package in the principal application (containing app) and can generate separate binaries for other applications to call.
personal feeling, similar to the launcher in WP, the system as a software, launcher is the application extension;
Two. Relationship with general application
1. App extensions are different from apps, but need to develop app extensions based on apps, and each app extension is a binary file that runs independently of the app.
2. Unlike the principal application, the application extension implements a specific, narrowly scoped task and adheres strictly to the protocol of the extension point.
Third, Life cycle
1. The life cycle begins when the user launches it from an application;
2. When the application extension completes the request task sent by the carrier app, the extension's life cycle also ends.
3. In the process of responding to the user's operation, the extension will start executing the task immediately according to the request of the carrier application;
4 You can perform tasks in the system background.
Iv. How to communicate
1. When the application extension is running, it will only communicate directly with the host app, and the extension and containing app will not communicate directly;
Suppose to do a sharing extension, our own app to visit, the host app is our own app, containing app is;
2. when an extension needs to communicate with the containing app, it can only communicate indirectly in the context in which the carrier application is determined, that is , the extension is not in a process, it belongs to interprocess communication;
Communication mode has an open URL, shared memory;
Five, how to develop
1. An extension can only correspond to one extension point, which is determined by Apple;
2. Each app extension corresponds to a target, and an app can have multiple app extensions
3. applications that contain extensions must provide a function beyond the extension, that is, the extension application is not an application in full sense.
4. in order to distribute the extension to the consumer, an app containing the extension needs to be submitted to the app Store. Users simply download and install your app, and your app extensions are installed automatically.
5. an app extension must provide an icon for the user to select and identify, and typically the app extension icon is the same as the app's icon. This is not the same as the launcher in WP;