Adding capabilities to your app

Configure your target to include and customize capabilities that provide access to Apple’s app services.

Overview

A capability grants your app access to an app service that Apple provides, such as CloudKit, Game Center, or In-App Purchase. To use some app services, you need to add a capability to your target in Xcode to configure the app service correctly. Xcode may edit the Entitlements and Information Property List files, add related frameworks, and configure your signing assets.

Some app services — such as Game Center and In-App Purchase — require additional configuration in App Store Connect and your developer account. For example, to provide directions for other apps using the Maps cabability, you upload a geographic coverage file in App Store Connect.

The platform, and whether you’re a member of the Apple Developer Program, may limit the capabilities available to your app. For the supported capabilities, go to the Reference section of Developer Account Help — for example, go to Supported capabilities (iOS) for the capabilities available to iOS apps.

Before you begin, add your Apple Account to settings and assign the project to a team in the project editor so that Xcode can create a provisioning profile for your app. For iOS, iPadOS, tvOS, visionOS, and watchOS apps, run your app on a device to register the device and create a development provisioning profile. For more information, see Running your app in Simulator or on a device.

Add a capability

You add capabilities to your app using the Signing & Capabilities pane of the project editor.

In the Project navigator, select the project — the root group with the same name as your app — and in the project editor that appears on the right, select the appropriate target in the sidebar and then click the Signing & Capabilities tab.

[Image]

Optionally, select a build configuration (All, Debug, or Release). For example, if you want to add the capability to the Debug configuration only, select Debug; otherwise, select All.

In the Signing & Capabilities toolbar, click the Capability button (+) to open the Capabilities library (or choose Editor > Add Capability). The Capabilities library displays only the capabilities available to the target platform and your program membership. Select a capability in the list to view its description on the right. Use the filter field in the toolbar to find a capability quickly.

[Image]

To add a capability to the target, double-click the capability in the sidebar or drag the capability from the library to the Signing & Capabilities pane. The capability appears below the Signing section. If there are more configuration steps, the capability expands to show additional controls (see Perform additional configuration steps below). To remove a capability, click the trash icon in the upper-right corner of the capability in the Signing & Capabilities pane.

[Image]

If errors appear in the Signing section, read the message and correct the problem. For example, the bundle ID (CFBundleIdentifier) that appears in the Bundle Identifier field under Signing needs to be unique. The default value for the bundle ID is the organization identifier concatenated with the app name that you enter when creating a project.

Perform additional configuration steps

For some capabilities, you may need to perform additional configuration steps in Xcode, your developer account, or App Store Connect. For other capabilities, you may need to write some code.

For more guidance on specific capabilities, see the table below:

Capability

Additional information

App Groups

Configuring App Groups

App Sandbox

Configuring The Macos App Sandbox

Apple Pay

Configuring Apple Pay Support

Associated Domains

Configuring An Associated Domain

Background Modes

Configuring Background Execution Modes

ClassKit

Enabling Classkit In Your App

Family Controls

Configuring Family Controls

Fonts

Configuring Custom Fonts

Game Controllers

Configuring Game Controllers

Group Activities

Configuring Group Activities

Hardened Runtime

Configuring The Hardened Runtime

HealthKit

Configuring Healthkit Access

HomeKit

Configuring Homekit Access

iCloud

Configuring Icloud Services

In-App Purchase

Overview For Configuring In App Purchases

Keychain Sharing

Configuring Keychain Sharing

Maps

Configuring Maps Support

Media Device Discovery

Configuring Media Device Discovery

Network Extensions

Configuring Network Extensions

On-Demand Install Capable

Creating An App Clip With Xcode

Push Notifications

Registering Your App With Apns

Sign in with Apple

Configuring Sign In With Apple

Siri

Configuring Siri Support

Wallet

Configuring Wallet Support