Contents

AppLibrary

A class that represents a catalog of all installed apps, and offers various services for the apps that your marketplace distributes.

Declaration

@MainActor final class AppLibrary

Mentioned in

Overview

Alternative app marketplaces call methods of this class to retrieve the set of currently installed apps, to request the installation of available apps, or to update the license for a specific app. Browser apps that use an alternative browser engine make a call to this class to install alternative app marketplaces from a webpage. You can also customize Spotlight search results and manage age-rating exception requests to install apps with an age rating beyond the maximum allowed for the device.

Perform app installation

To install apps with this class, the system requires the following criteria:

requestAppInstallation(_:)

Your app needs to have the com.apple.developer.marketplace.app-installation entitlement.

requestAppInstallationFromBrowser(for:referrer:)

Your app needs to have the com.apple.developer.browser.app-installation entitlement.

requestInlineAppInstallation(_:subjectToken:)

The app to install must be from the same developer account as the one that distributes the app that calls the method. The app to install also needs to be owned or controlled by you.

Observe runtime changes

The class is observable (through SwiftUI or the Observation framework), so you can provide reactive updates when finishing, installing, updating, or loading (see isLoading).

Topics

Accessing app library and account authorization information

Installing apps as a marketplace

Installing apps as a web browser

Installing web-distributed apps from your app

Accessing installed apps

Checking for age-rating based content restrictions

Filtering app searches

Updating apps

Determining device region

Deprecated

See Also

App management