Enabling App Services
Certain app services—such as iCloud and push notifications—are available only to apps distributed through the store and require additional configuration in your Xcode project, Member Center, and sometimes iTunes Connect. To avoid code signing and provisioning issues, let Xcode perform the configuration steps for you when you enable these app services in your Xcode project. There should be no need for you to configure the Xcode project or enable these app services in Member Center yourself.
View App Services
The key app services you can add to your app are listed in the Capabilities pane in the project editor. Be sure to select the correct target in your project before enabling app services.
To open the Capabilities pane
Choose View > Navigators > Show Project Navigator.
Choose the target from the Project/Targets pop-up menu or in the Targets section of the second sidebar if it appears.
Click Capabilities to view key app services.
The screenshot below shows the Capabilities pane for an iOS app.
For Mac Apps, Enable App Sandbox
All apps submitted to the Mac App Store are required to use App Sandbox, so if you’re developing a Mac app for the store, enable App Sandbox now.
To configure App Sandbox
In the project navigator, click Capabilities.
If App Sandbox isn’t enabled, select the switch in the App Sandbox row.
Xcode adds an entitlements file to your project and enables the App Sandbox entitlement.
In the App Sandbox area, use the checkboxes to set additional entitlements for the app to do its job.
Enable App Services
In most cases, enabling a capability is as simple as turning on a switch. However, some app services—such as iCloud, Keychain Sharing, Wallet, and Background Modes—require more configuration. Additional options and instructions for those app services appear after the capability is enabled. Other app services—such as Game Center, In-App Purchase, and Maps—require additional configuration in iTunes Connect and are not covered in this document.
To enable a capability
In the project navigator, click Capabilities.
Click the disclosure triangle next to a capability and read its description.
Xcode displays the steps it will perform to enable the capability, so you don’t need to perform these steps yourself. For example, to view Game Center configuration steps, click the disclosure triangle next to Game Center.
Select the switch in the row of the capability you want to enable.
For example, to enable Game Center, select the switch in the Game Center row. If Xcode successfully enables the capability, checkmarks appear to the left of the configuration steps, as in the screenshot below for an iOS app. Some configuration steps include adding frameworks to your project. For example, when you enable Game Center, GameKit framework is added to your project.
If an error occurs, follow the instructions in the error message, and click the Fix Issue button to resolve the problem.
For example, if you are offline, Xcode will fail to communicate with Member Center and complete all the steps. When you click the Fix Issue button, Xcode attempts to perform any remaining steps.
After enabling app services in your Xcode project, click the Run button in the project navigator to build and run your app using the new team provisioning profile.
Verify App ID Entitlements
To better understand how provisioning works, verify that Xcode adds entitlements to your App ID (according to the app services you enabled) and regenerates the corresponding team provisioning profile.
Remember that Xcode initially creates a team provisioning profile containing a wildcard App ID that can be used to sign multiple apps and enable some app services. For example, if you enable Wallet, the Wallet entitlement is added to the wildcard App ID. Later, when you enable app services that require an explicit App ID, Xcode registers an explicit App ID that uniquely matches the app’s bundle ID. Xcode then creates another team provisioning profile that contains the explicit App ID. If an App ID already exists for your app, Xcode uses it in the team provisioning profile instead. Therefore, you may see multiple team provisioning profiles in your account—one for the wildcard App ID and one for each explicit App ID in your account.
View Provisioning Profiles in Xcode
Whenever you create a development certificate, register a device, or change an entitlement, Xcode regenerates and downloads the team provisioning profile. You can view the downloaded provisioning profiles in Xcode.
To view your team provisioning profile in Xcode
Choose Xcode > Preferences, and click Accounts at the top of the window.
Select the team you want to view, and click View Details.
In the dialog that appears, view team provisioning profiles in the Provisioning Profiles table. If your team provisioning profile uses the Xcode-managed wildcard App ID, the team provisioning profile name ends in
For example, Xcode uses the wildcard App ID if only Wallet is enabled in this screenshot for an iOS app:
If you enable iCloud, which requires an explicit App ID, Xcode creates a new provisioning profile using the explicit App ID, as shown in the iOS app screenshot below.
View Provisioning Profiles in Member Center
If you join the Apple Developer Program, you can view more details about provisioning profiles in Member Center than you can in Xcode.
To view your team provisioning profile in Member Center
In Certificates, Identifiers & Profiles, under Provisioning Profiles, select All or Development.
If you add a capability that requires an explicit App ID, multiple active team provisioning profiles appear. Xcode uses the team provisioning profile containing the explicit App ID that matches your app’s bundle ID; otherwise, Xcode uses the team provisioning profile containing the wildcard App ID.
Under iOS Provisioning Profiles or Mac Provisioning Profiles, select the team provisioning profile.
The entitlements appear in the Enabled Services list and may be a superset of the entitlements you added to your project using the Capabilities pane.
For iOS apps, if you enable an app service that requires an explicit App ID, both the Game Center and In-App Purchase entitlements are added to your App ID by default. For Mac apps, In-App Purchase is enabled by default for an explicit App ID. However, to use these services from your app, enable them in the Capabilities pane.
Verify the App ID Settings
Xcode adds entitlements to an App ID, not to a team provisioning profile, so verify App ID settings in Member Center to learn where this information is located.
To verify the App ID settings
In Certificates, Identifiers & Profiles, select Identifiers, and under Identifiers, select App IDs.
Select the explicit App ID that matches your bundle ID if it exists; otherwise, select the Xcode-managed wildcard App ID.
The Application Services table contains a whitelist of the services your app can use. A green circle followed by “Enabled” appears in the Development column of the services your app can use. A yellow circle followed by “Configurable” appears if the app services is not fully configured.
You can also edit App ID settings using Member Center, but any changes you make in Member Center won’t configure app services in your Xcode project. Use the Capabilities pane in Xcode to fully configure app services.
Learn More About App Services
Refer to this table for more information on key app services that appear in the Capabilities pane in Xcode or require additional configuration using Xcode, Member Center, or iTunes Connect.
To learn about
A mobile payment technology that lets users give you their payment information for real-world goods and services.
Provides the last line of defense against stolen, corrupted, or deleted user data if malicious code exploits your Mac app.
Configuring App Sandbox for Mac Apps
App Sandbox Design Guide
Enabling background modes allows your app to continue running in the background.
Provides a database-like model for storing both private and public data where public data is owned by the app and can be shared among all users of the app.
For iOS apps, adds a level of security to files stored on disk by your iOS app.
Allows players to connect devices to Apple’s social gaming network and to exchange information.
For iOS apps, provides a structure that apps can use to share health and fitness data.
For iOS apps, provides ability for apps to control accessories that support HomeKit Accessory Protocol.
iCloud Storage Key-Value and Document Storage
Allows sharing of user’s data among multiple instances of your app running on different devices and Mac computers.
Embeds a store directly into your app by accessing the store and securely processing payments from the user.
Allows your app to export audio that other apps can use.
Allows your app to share passwords in the keychain with other apps developed by your team.
Makes your app’s routing information available to Maps and other apps that need point-to-point directions.
Push Notifications (Apple Push Notification service)
Allows an app that isn’t running in the foreground to notify the user that it has information for the user.
Configuring Push Notifications
Presents digital representations of information—such as a coupon, ticket for a show, or boarding pass—that allow users to redeem a real-world product or service.
In this chapter, you learned how to enable some app services that Apple provides for apps submitted to the store. By examining your team provisioning profiles and App IDs in Member Center, you gained a deeper understanding of how provisioning works. You also learned where to find more information on these app services.