Xcode Help Topics

Xcode is Apple’s integrated development environment (IDE). You use Xcode to build apps for Apple products, including iPad, iPhone, Apple Watch, Apple TV, and Mac.

Welcome to Xcode: You use Xcode to create your app: lay out the app’s user interface, write code, run your app, and debug it.

Get started in Xcode

Create your Xcode project: You can create an Xcode project from a template.

Run your app on a simulated or real device: You can build and run your app on a simulated or real device.

Create the user interface: You layout the user interface of your app directly in Xcode using Interface Builder.

Write your code: Learn the basics to writing code using the source editor.

Debug your app: You use the debugger to control the execution of your code, inspect variables, and view output of a running app.

Use source control: You can use source control directly in the Project navigator and editor area.

Test your app: You should thoroughly test your app in Xcode before submitting it to App Review or distributing it outside of the App Store.

Distribute your app: After you test your app in Xcode, you can distribute it to internal and external testers, then release it on the App Store.

Xcode basics

Build and run your app: Click the Run button in the toolbar to build and run your code for the selected scheme.

Choose the action performed by the Run button: You can change the action that the Run button performs.

Configure the main window

About the main window: The main window is where you create, manage, and edit your development projects and related files.

Show or hide the main window areas: Show and hide the navigator, debug, and utility areas using the workspace configuration buttons in the toolbar.

Change the editing area: Switch between using a single editor, an editor and an assistant editor, or a version editor using the editor configuration buttons in the toolbar.

Use tabs in the main window: You can reduce clutter on your desktop by opening window layouts in tabs instead of separate windows.

Manage files and navigate symbols

Locate and manage items in a project or workspace: Use the Project navigator to open, add, delete, and organize files in a project.

Add files and folders to a project: You can add new files from a template, or add existing files and folders from your computer.

Navigate the classes, functions, and other symbols: Use the symbol navigator to browse the symbols available in your project. Select one to show it in the editor area.

Navigate to files and symbols using the jump bar: Click elements in the jump bar above each editor area pane to quickly navigate to files and other items, such as properties and methods in your source code.

Open a file containing a symbol: Choose File > Open Quickly from anywhere in Xcode to find and open a file containing a symbol in your project or in the system frameworks.

Open a file in the hex editor: You can view and edit a file in its binary format by opening it in the hex editor.

Use workspaces for related projects: You can view and edit a file in its binary format by opening it in the hex editor.

Reference a project from another project: You can cross-reference another project for the purposes of establishing a dependency and referring to the other project’s targets, files, and products.

Choose where to display a file: Use the navigation chooser to select where to display a file.

Search for developer documentation: You can find SDK reference, articles, and sample code in Xcode.

Rename a project or an app: Use the File inspector to give a project or an app a new name.

Edit property lists: Click a property list in the Project navigator to inspect or edit its values in the source editor.

Migrate to Swift 4 @objc inference: Reduce binary size by migrating to using Swift 4 explicit @objc attributes with the Minimize Inference option. See “Migrate to using Swift 4 explicit @objc attributes” in Xcode Help for how to complete the migration.

Customize Xcode

Manage general environment settings: Manage general environment settings, such as the amount of detail displayed in the Find and Issue navigators, whether runtime errors occur, and whether building continues when errors occur.

About Accounts preferences: Use Accounts preferences to add your Apple ID account, source code repositories, and servers.

Add your Apple ID account: Add an Apple ID so that you can select a team and launch apps on devices.

Configure actions for events: Configure Xcode to respond to certain events by performing one or more specific actions, such as playing a sound, displaying a notification, opening a tab, or running a script.

Configure how files are opened and displayed: Select the editor area that displays files when they’re opened by clicking, Option-clicking, and double-clicking.

Manage fonts and colors: Customize the appearance of source code and console text, or to switch to a different font and color theme.

Set code editing and indentation preferences: Configure code editing and indentation options.

Adjust keyboard shortcut mappings for menus and text operations: View and customize keyboard shortcuts for invoking menus or initiating operations on selected text.

Customize the Touch Bar controls: Open the desired editor or debugger and Choose View > Customize Touch Bar.

Configure source control management: Enable, disable, or manage source control behavior.

Customize text macros: Customize existing text macros and add new text macros by adding them to the top level of the IDETemplateMacros.plist file.

Customize the header used for new files: Change the FILEHEADER text macro to change the header used for new files.

Manage simulators and toolchains

Download and install simulator runtimes: Download and install simulator runtimes in the Simulators pane of Components preferences.

Switch toolchains: Use the Toolchains pane of Components preferences to switch between toolchains.

Verify, reveal, and delete installed toolchains: Use the Toolchains pane of Components preferences to verify, reveal, or delete installed toolchains by clicking the Action button next to a toolchain.

Manage the locations of project-generated files: Specify different locations for project files, choose an Xcode version for command-line tools to use, and configure custom paths.

Choose the build system: In the project settings, you can specify the build system to use for the project or the user.

Create playgrounds

Create, edit, and execute playgrounds: A playground is an interactive Swift coding environment that evaluates each statement and displays results as updates are made, without the need to create a project.

Add auxiliary code to a playground: Add auxiliary code to a playground or page by adding Swift source files to the Sources folder of the playground or of a page.

Add resources to a playground: Add resources to a playground or page by adding resource files to the Resources folder of the playground or of a page.

Add, edit, and view rich comments: Add and rich comments to your playgrounds using the playground markup format. Choose Editor > Show Rendered Markup to view the formatted comments. Choose Editor > Show Raw Markup to edit the raw comments.

Add, move, and rename playground pages: Add a new page to your playground by choosing File > New > Playground Page or by copying an existing page. Move pages by dragging them to a new location.

Copy a page from one playground to another: Copy a page from a different playground by dragging it from the Project navigator of one playground to the Project navigator of the other playground.

View detailed results of an executed statement: View the results of an executed statement by viewing a Quick Look in the sidebar or by adding a results view to the playground.

Add an interactive live view: Add an interactive live view to the assistant editor of you playground by using PlaygroundSupport to set the live view of the current page to an instance of a view or view controller.

Add a color, file, or image literal: Create literals in your playground code for colors, files, or images that do not need to change by using Editor > Insert Color Literal, or by dragging in files or images.

Use a custom framework in a playground: Add a custom framework to the workspace containing your playground. Add an import statement to a source file to use the framework.

Run your app on a device

Signing workflow: You code sign your app to run on a device or use certain app services.

Run an app on a connected device: You can launch your app on a device through Xcode.

Pair a wireless device with Xcode (iOS, tvOS): Before you can launch your app on a wireless device, you must pair the device with Xcode.

Run an app on a wireless device (iOS, tvOS, watchOS): After you pair a device with Xcode, you can launch your app on the device over WiFi or other network connection.

Troubleshoot a wireless device (iOS, tvOS): To troubleshoot a wireless device, verify that the device is paired to Xcode, that the Mac and device are on the same network, and that you can ping the device.

View signing reports: You can find out about signing issues that Xcode resolves by viewing signing reports.

Edit source code

Fix issues while writing code: You can use the Fix-it feature in the source editor to automatically correct issues in your code.

Use code completion to enter symbols: While typing in the source editor, you can complete a symbol by choosing one that Xcode suggests.

Balance and identify matching braces, parentheses, and brackets while editing your code: Xcode includes features to help identify and balance beginning and ending delimiters while editing your code.

Edit all occurrences of a symbol in your code: Simultaneously modify all occurrences of a symbol, such as a local variable or parameter, in the current scope or the entire project.

Add placeholders for missing protocol properties and methods: Use the Action menu to add placeholders for any missing protocol requirements.

Add code using the Action menu: Use the Action menu to add templates to your code.

Extract code to new functions and variables: Use the Action menu to extract code to new functions and variables.

Create and use code snippets: Code snippets define frequently used pieces of code, which you can quickly insert into source files.

Find and replace content in a project: Use the Find navigator to perform search and replace operations across a project.

Add code annotations to the jump bar: Add to-dos, bug-fix reminders, and section headings to the jump bar by annotating your code.

Collapse and hide code that you aren’t currently editing: Collapse and hide portions of code you aren’t currently editing.

Refactor your code: Use the Action menu to rename symbols and to extract code to variables or functions.

View symbol declarations and reference documentation: You can view symbol declarations and reference documentation directly in the source editor and inspector.

Analyze your code for potential flaws: Choose Product > Analyze to find flaws—potential bugs—in your code before running it.

Switch the syntax coloring style of your code: Use the Editor > Syntax Coloring menu to keep the default syntax colors based on file type, or switch to the syntax colors of a specific programming language.

Lay out user interfaces

Interface Builder workflow: You use Interface Builder to lay out your app’s user interface and make connections to your code.

Add objects and media

Add objects to the user interface: You add objects to the user interface by dragging them from the Object library to the canvas or outline view.

Add a media object to the user interface: You can enhance the user interface by adding media elements such as icons, graphics, and audio.

Add a custom object to the user interface: You can add instances of your classes to a user interface file.

Render and inspect your custom views: You can render and inspect your custom views in Interface Builder.

Debug a custom view in Interface Builder: You can debug a custom view directly in Interface Builder without needing to run your app.

Align objects using the alignment rectangle: You can view the size of objects on the canvas using the frame rectangle or the alignment rectangle that includes runtime adornments added by the system.

Place views using guides: Use guides for precise view placement by choosing Editor > Snap to Guides. Add guides to a view using the Editor > Guides submenu.

Add, edit, and delete a user defined runtime attribute: Use the Identify inspector to add custom attributes that are initialized when a nib file is loaded.

Set the file’s owner for a custom Xib: Use the Identity inspector to set the class of the top level object loaded for a Xib file.

Auto resize and position objects

About Auto Layout and Layout Constraints: You use Auto Layout to create relationships between views so that when the screen or window changes size, all the views adjust their sizes and positions appropriately.

Specify distance and alignment constraints: You can quickly specify the distance and alignment constraints of views using the Align tool.

Specify fixed size, aspect ratio, and position constraints: You can quickly specify the size, aspect ratio, and position constraints of views using the Add New Constraints tool.

Add a constraint by control-dragging: Control-drag between two items or within an item to quickly create and specify a constraint.

View and manage the constraints for an item: View and delete constraints for an item using the Size inspector.

Find and resolve Auto Layout errors and warnings: Quickly resolve Auto Layout issues by clicking on a constraint issue in the outline view or by selecting views on the canvas and looking for orange or red constraint lines.

Edit a constraint: Edit the values for a constraint by double-clicking on the constraint or by selecting the constraint and opening the Attributes inspector.

Set the placeholder intrinsic size for a view: Use the Size inspector to set an intrinsic size for a view to avoid design time constraint ambiguity.

Add device-specific variations

View the user interface using different device configurations: In Interface Builder, you can view the layout using different device configurations by selecting a device family, orientation, adaptation, and interface style.

Create user interface variations for different device configurations: You can create variations of the user interface for specific device configurations.

Edit trait-based variations of property values using the inspector: You can customize property values for each device configuration using the inspector.

Connect objects to code

Add an outlet connection to send a message to a UI object: You add an outlet connection to send messages from your code to a user interface object.

Add an action connection to receive messages from a UI object: You add an action connection to receive messages from a user interface object.

Add, remove, and modify connections: You can add, remove, and edit connections using the connections panel.

Add an object to the user interface: You can add objects to a user interface file in order to make connections from UI objects to its properties and methods.

Add, remove, and edit Cocoa bindings: Connect attributes of user interface elements by control-dragging to properties in your code. Edit bindings using the Bindings inspector.

Edit objects and storyboards

About storyboards, scenes, and connections: You use storyboards to graphically lay out the user interface using scenes and defining the relationships and transitions between them.

Add scenes and views: You add scenes to a storyboard to add a new path for the user to follow in your app.

Add a segue to a storyboard: You add segues to specify a transition from one scene to another.s

Configure segue attributes: You use the Attributes inspector to configure the attributes for segues.

Add a storyboard reference: You add storyboard references to connect to another storyboard or to organizer your storyboard

Configure object attributes: In Interface Builder, you can use the Attributes inspector to configure the selected object.

Layer views: Use the Edit > Arrange submenu to move a view in front of or behind sibling views.

Set the initial scene for a storyboard: You can set the scene that is displayed when your app first launches.

Refactor a storyboard into multiple storyboards: On the storyboard, select the desired view controllers and choose Editor > Refactor to Storyboard and save the new storyboard.

Preview your layout for different iOS devices in different orientations and localizations: Add previews for different iOS devices and localizations by choosing Preview in the Assistant editor toolbar.

Preview the items in your NSTouchBar object: Preview the items in the selected NSTouchBar object by choosing Editor > Preview Touch Bar.

Add simulated status, top, and bottom bars: Add simulated status, top, and bottom bars to view controllers using the Attributes inspector.

Set a simulated screen size: Change the simulated size of a view controller on the canvas using the Attributes inspector.

Toggle showing placeholder backgrounds on the canvas: Show or hide the placeholder backgrounds for certain types of views by choosing Editor > Canvas > Show Placeholder Backgrounds.

Work with assets

Create asset catalogs and sets: You use asset catalogs to organize and manage the images used by the user interface.

Add an App Store icon: If you distribute your app through the App Store, you must provide a specific icon used to represent your app on the App Store.

Use an asset catalog for an iOS app launch screen: You can optionally use an asset catalog for an iOS app launch screen.

Use texture atlases to improve performance: You can improve performance of your app by combining multiple image files into one or more large image files called texture atlases.

Create and edit 3D scenes using SceneKit scene editor: You can quickly build, edit, and preview games and interactive 3D apps with less code by designing scenes in SceneKit scene editor.

Preview 3D scenes using SceneKit scene editor: You can preview your project’s 3D scenes with SceneKit’s scene editor, and use the viewport and preview options to customize your point of view.

Add a resizable area to an image: Use the Xcode Slicing feature to specify a resizable center area of an image.

Create asset variations for different device traits: Use the Attributes editor to add, remove, and edit trait-based variations of an asset in the asset catalog.

SpriteKit particle emitter editor

Add a particle emitter to your project: You can add a particle emitter to your app to create and edit SpriteKit particle effects.

Add a particle emitter to your scene: You can use the SpriteKit scene editor to display your particle emitter at runtime.

Change the background and texture of a particle emitter: You can use the particle emitter editor to quickly change the shape of the particles and the background color of the preview.

Manage a particle’s life cycle: You can use the particle emitter editor to set the number of particles created by your particle emitter and how long the particles are displayed.

Control movement and physics reactions: You can determine where a particle is created and the speed and angle that the particle moves after creation.

Adjust the size and rotation of a particle: You can adjust a particle’s size during its lifetime and control the speed and direction in which the particle rotates when it is created.

Change a particle’s color: You can use the particle emitter editor to change the color of a particle through its lifetime.

Assign and configure custom shaders: You can use custom shaders to determine how particles are rendered in your app.

Debug your app

Use the debug area to control and inspect your running app: The debug area in the main window enables you to interact with the debugger to control the execution of your code and inspect variables, registers, and console output.

Control the execution of your running app: You can control the execution of your running app in the debug area.

Debug an app or process that is already running: Debug an app that is already running by choosing Debug > Attach to Process and selecting the app.

Run your app with sanitizers, memory management diagnostics, and logging options: While testing and debugging your app, use the scheme editor to enable runtime memory management diagnostics and logging options.

Examine variables and threads

View variables in the debug area: You can inspect a variable to identify a problem in your source code.

See the value of a variable at runtime: See the current value of variable at runtime by setting a breakpoint and hovering over the variable when execution pauses.

Examine threads and stacks in the Debug navigator: You use the Debug navigator to examine threads and stacks, or monitor debug gauges of a running app.

View threads in the debug area: You can view different threads in the debug area.

Suspend and resume threads: You can use the Debug navigator to suspend and resume threads in your running app.

Set breakpoints

Add, remove, disable, and enable breakpoints in your code: Set breakpoints so you can pause at known points while debugging and inspect the values of variables in your source code.

Navigate and manage breakpoints: Use the Breakpoint navigator to add, delete, and edit breakpoints.

Pause execution when events occur: Add breakpoints to your project to pause when certain types of events occur, such as exceptions, Swift errors, and test failures.

Examine views

About the view hierarchy debugger: Inspect a the view hierarchy of your app using a hierarchical list, a 3D rendering of the view hierarchy, and inspectors for object attributes and sizing.

Examine the view hierarchy: You can inspect a 3D rendering of the view hierarchy of your paused app.

Filter the view hierarchy: Filter the objects shown in the Debug navigator view hierarchy by entering text into the filter bar and by showing hidden views.

Focus on a part of the view hierarchy: Focus on a portion of the view hierarchy by showing only a view and its descendants, or by changing the topmost and bottommost view on the canvas.

Inspect a view controller, view, or constraint: View the current attribute values of a selected view object or constraint in the Object inspector and view the size and constraints for a selected view object in the Size inspector.

Open the source code for a view object: Click on the arrow next to a class name in the Debug navigator to open the source code for that object.

Optimize performance

Monitor a running app using debug gauges: You can use the debug gauges to monitor a running app to find problems in its use of system resources.

Monitor your app’s energy usage (iOS, macOS): Use the Energy Impact gauge to monitor your app’s energy usage.

Profile the performance and behavior of your app: Choose Product > Profile to profile your app in Instruments. Use the scheme editor to customize profiling options.

View and filter logs and reports: Use the Report navigator to browse the reports and logs that Xcode generates during your development process.

View and address issues: You use the Issue navigator to view problems found when opening, analyzing, and building your project.

Show and Hide the Touch Bar simulator: You can show a representation of the Touch Bar in a window.

Simulate a location for your running app: You can simulate running your app in a particular location.

Test code

Run UI tests and unit tests: Use the Test navigator to test the performance and behavior of your code.

Add a test class to a project: Click the Add button (+) at the bottom of the Test navigator and select New UI Test Class or New Unit Test Class. When prompted, enter a name for the test class and choose a target.

Add a test target to a project: Click the Add button (+) at the bottom of the Test navigator and select New UI Test Target or New Unit Test Target. When prompted, enter options for target.

View UI test and unit test reports: You can view reports of your UI test and unit test runs.

View UI test and unit test failures: Examine failed tests to determine the source of issues.

View and adjust performance tests: Navigate your performance tests in the Test navigator. View the results of performance test results and adjust their baselines in the editor area.

Enable code coverage: You enable code coverage to get statistics about your source code in test reports.

Configure targets and builds

Edit general settings

About the General pane: Use the General pane of the project editor to adjust general settings for the targets in your project, such as identity, signing, and deployment options.

Edit identity settings

Set the bundle ID: You set the bundle ID to uniquely identify your app or targets within your app bundle.

Set the app category (macOS): For macOS apps, you set the application category in the project editor and it needs to match the category you select in iTunes Connect.

Set the version number and build string: You should update the version number and build string before distributing your app.

Edit signing settings

Assign a project to a team: You must assign all the targets in a project to a team to code sign your app.

Manually sign an app: You can choose to create provisioning profiles and to configure your project yourself.

Edit deployment info settings: You set the deployment info to specify which OS versions and device configurations your app supports.

Create a launch screen (iOS): You should create a launch screen for your iOS app.

Edit info settings

Edit the information property list: Edit the information property list to further configure your project or target.

Add export compliance keys: You can specify export compliance information for each build that you upload to iTunes Connect.

Set the copyright key (macOS): For macOS apps, set the copyright key in the information property list.

Set supported document types (iOS, macOS): You can configure your app to support different document types.

Edit build settings

Configure build settings: Configure build settings in the Build Settings pane of the project editor to change the behavior of the build system.

Learn about a build setting: Use the Quick Help inspector to see details for a selected build setting in Xcode, or view the reference documentation for build settings in Xcode Help.

Conditionalize build settings for different platforms: Conditionalize individual build settings to produce product variations for different architectures and SDKs.

Evaluate build setting value inheritance: View the inheritance hierarchy of build settings, to determine whether values are defined at the default, project, or target level.

Monitor the status of builds: Check the activity view in the toolbar and build reports in the Report navigator to monitor the status of builds.

Add a build configuration (xcconfig) file: Add a Configuration Settings File to your project to allow build settings to be edited outside of Xcode.

Link a target to libraries and frameworks: Use the General pane of the project editor to specify the libraries and frameworks a target needs to run.

Reduce the size of your app by stripping Swift symbols: Strip the symbols from Swift frameworks to reduce the size of your app.

Manage schemes

Configure schemes: Use the scheme editor to configure the schemes in your project.

Add, delete, rename, and share schemes: Choose Manage Schemes from the scheme menu in the toolbar to manage the schemes in your project.

Build multiple targets: In the scheme editor, configure the Build action to build specific targets when you run, test, profile, analyze, or archive your app.

Specify runtime arguments and environment variables for your app: You can use runtime arguments and environment variables when you run your app in Xcode by configuring a scheme’s Run action.

Switch schemes and destinations: Use the scheme menu in the toolbar to switch the active scheme and destination.

Configure capabilities

Add a capability to a target: You can add special capabilities to a target to enable services provided by Apple such as Apple Push Notification service, CloudKit, Game Center, and In-App Purchase.

Configure app groups: You use app groups to allow multiple apps to share containers and to communicate between each other.

Configure App Sandbox (macOS): For macOS apps, enable App Sandbox to protect user data and if you plan to submit your app to the Mac App Store.

Configure Apple Pay (iOS, watchOS): Enable Apple Pay to allow users to pay for goods and services from your app.

Configure associated domains (iOS, tvOS, watchOS): You enable associated domains to associate your app with a domain to access specific services.

Configure background modes (iOS, tvOS, watchOS): You enable background modes to run your app in the background.

Configure HomeKit (iOS, tvOS, watchOS): You use HomeKit to communicate with and control connected accessories in a user’s home.

Configure iCloud services

Enable iCloud key-value storage, document storage, or CloudKit: You can choose from three different iCloud services—key-value storage, document storage, and CloudKit—to add to your targets.

Manage iCloud document storage and CloudKit containers: iCloud document storage and CloudKit apps can use custom containers, use multiple containers per app, or share containers between apps.

Manage CloudKit schemas and records: You use CloudKit Dashboard to create record types and manage records.

Configure keychain sharing: You enable keychain sharing to share passwords in the keychain with other apps you develop.

Configure Maps

Enable Maps and select modes: You enable Maps to get directions or provide directions to Maps and other apps.

Configure a routing app (iOS, watchOS): You perform several steps to configure a routing app that provides point-to-point directions.

Upload a geographic coverage file for a routing app (iOS, watchOS): Routing apps must have a geographic coverage file in iTunes Connect.

Configure game controllers (tvOS): You can specify the supported game controllers.

Enable push notifications: Enable push notifications to allow your app to notify the user when it has information for the user.

Configure Wallet (iOS, watchOS): Enable Wallet to access the user’s passes in your app.

Configure Siri (iOS, watchOS): If you want to handle Siri requests, enable Siri.

Configure network extensions: Enable network extensions and specific features.

Manage devices

Locate a device ID: You can get the identifier for a connected device using Xcode.

Install and uninstall apps on a device: You can install and uninstall apps on a device using Xcode.

Install a beta operating system on a device: You can install a beta operating system on a device to prepare for new features.

View crash or energy logs on devices: You can view crash or energy logs directly on a device where they occurred, or view the logs you import from other sources.

Find device crash and energy logs on a Mac or Windows computer: External testers can collect device crash and energy logs on their Mac or Windows computer.

View, download, and replace app containers on a device: You can view, download, and replace app containers on a device connected to your Mac.

Take a screenshot on a device: You can take a screenshot on a device connected to your Mac.

Create a simulator configuration: You can create your own custom simulator configurations.

Pair Apple Watch simulators to iPhone simulators: You can pair Apple Watch simulators to iPhone simulators.

View Apple Watches paired with an iPhone: You can view all the Apple Watches paired with an iPhone.

Maintain signing assets

What is app signing?: Xcode creates signing certificates as needed in order to code sign your app during the build and archive process.

Export signing certificates and provisioning profiles: You export your developer account signing certificates and provisioning profiles to back them up or transfer them to another Mac you use for development.

Create, export, and delete signing certificates: In You can view, create, reset, and export signing certificates using Accounts preferences.

Download manual provisioning profiles: You can download individual or all provisioning profiles that you create in your developer account.

View, delete, and install provisioning profiles on devices: Use the Devices and Simulators window to view, delete, and install provisioning profiles on devices.

View or remove a signing certificate in your keychain: You can use Keychain Access to view or remove a signing certificate.

Signing troubleshooting

If a signing certificate or private key is missing: If a signing certificate for a certificate in your developer account is missing, you can revoke the certificate and re-create the signing certificate.

If an intermediate certificate authority is missing: If your certificates are invalid because you are missing an Apple certificate authority, download and install it in your keychain.

If a code signing error occurs: If you manually sign an app, code signing errors may occur when you build your app.

If a build has an entitlement error: If an entitlement error occurs at installation or runtime, you can use command-line utilities to compare the app’s signature to the embedded provisioning profile.

Manage source control

Source control workflow: You should use source control to back up your files, collaborate with others, and tag your releases.

Create a local source control repository: You can create a local source code repository for a new or existing project.

Commit changes to a source code repository: Commit changes to a local or remote source code repository to preserve them.

Compare revisions of a file: If you use source control, you can compare revisions of your files using the Comparison editor.

About the source control history editor: Use the history editor to view commits in a branch and details about a commit.

Add a GitHub account: Before you create a GitHub repository, add your GitHub or GitHub Enterprise credentials to Accounts preferences.

Create a remote from a local source code repository: You can create a remote from a local source code repository when you are ready to share your project with others.

Clone a project from a remote source code repository: You clone a project from a remote source code repository to create a working copy of the project on your Mac.

Add an existing remote to your local repository: You can add an existing remote repository to your local repository.

Add collaborators and share a repository (Git): Add collaborators to your repository so that they can commit changes.

Update your working copy with changes in the repository: Keep your working copy up to date with changes made by others to a branch in the repository.

Manage branches: You can create a branch in a repository to separate feature work or to isolate your changes from others.

Use tags: You can tag a version of a branch or a commit so that you can find it easily later.

Add a README or other Markdown file: You can add a README or other Markdown file to your project and edit it using the source editor.

Archive, distribute, and test

About Archives organizer: In the Archives organizer, you can upload, export, or validate your app. Upload your app to distribute it for testing or through the App Store. Export your app to distribute it outside of the App Store.

Prepare for app distribution: You need to set certain target settings before you distribute your app for testing or upload it to iTunes Connect.

Create an archive of your app: You must create an archive of your app before you upload or export it.

Test a beta version

Distribute an app using TestFlight (iOS, tvOS, watchOS): You can distribute a beta version of your app to internal and external users using TestFlight.

Distribute to registered devices (iOS, tvOS, watchOS): You can distribute your app to registered devices using an ad hoc or development provisioning profile.

Export an iOS, tvOS, or watchOS app: You can export your app to distribute it outside of the App Store.

Manually manage distribution signing: You can choose to manually manage your distribution signing assets when you export your app.

Distribute to registered computers (macOS): You can distribute your macOS app to registered computers using a development provisioning profile.

Export a macOS app: You can export your macOS app to distribute it outside of the Mac App Store to users or for testing.

Test the Mac Installer Package: You should test the Mac Installer Package before uploading your macOS app to iTunes Connect.

Create an enterprise app

Develop and distribute enterprise apps: You develop your Apple Developer Enterprise Program app similar to any organization developing an iOS app except you use special enterprise assets and options.

Manually trust a developer on iOS: If you distribute your app outside the App Store, users may need to manually trust your organization to run your app.

Distribute outside the Mac App Store

Distribute outside the Mac App Store (macOS): If you distribute your macOS app outside the Mac App Store, sign it with a Developer ID certificate so users know it comes from a trusted developer.

Test a Developer ID-signed app: Verify that your app behaves correctly when Developer ID-signed apps are enabled and disabled.

Enable and disable Developer ID apps and Gatekeeper: When testing your Developer ID-signed app, you can enable and disable Gatekeeper using a command-line tool.

Sign a Mac Installer Package with a Developer ID certificate: If you distribute your macOS app using a Mac Installer Package, then sign the package with a Developer ID Installer certificate.

Submit apps to the App Store

What is app thinning? (iOS, tvOS, watchOS): App thinning is a process that the App Store and operating system perform to optimize your app for the target device and reduce its footprint.

Distribute an app through the App Store: After testing your final build, submit it to App Review for distribution through the App Store.

Validate an archive of your app: You can run App Store validation tests on your archive before you upload it.

Upload an app to iTunes Connect: You must upload your app to iTunes Connect before you can submit it to the App Store or distribute it for testing using TestFlight.

Upload in-app purchase content: You can have Apple host non-consumable in-app purchase products and upload the in-app purchase content to iTunes Connect using Xcode.

Verify the target and project build settings: Verify the target and project build settings before you distribute your app through the App Store.

Supported Xcode and Application Loader versions: You must use the supported versions of Xcode or Application Loader to upload your app to iTunes Connect.

View crash and energy reports

About Crashes organizer: In the Crashes organizer, you can manage crash reports generated from app versions and builds you distribute through TestFlight or the App Store.

About Energy organizer: In the Energy organizer, you can manage energy reports generated from app versions and builds you distribute to users through TestFlight or the App Store.

How crash and energy reports are created: Apple provides a service that collects logs from users and organizes them into downloadable reports.

Select a crash or energy report: After you distribute your app through the App Store, you can select a crash or energy report Apple collects for you in the organizer.

View a crash or energy report: After you select a crash or energy report in the organizer, you can view the logs for the report in the detail area.

Inspect a crash or energy report: You can view details—such as the source code where an event occurred—and add metadata about crash and energy reports.

View crash or energy report statistics: You can view statistics about when and on what devices crash and energy logs occur.

Symbolicate crash and energy logs

What is symbolication?: Symbolication replacing memory addresses in a crash or energy log with human-readable function names and line numbers.

Download dSYM files: If you include bitcode when you upload your app, download the dSYM files before you view crash and energy logs in the Devices and Simulators window.

If logs aren’t symbolicated: If logs aren’t symbolicated in the Crashes or Energy organizer, follow these steps to symbolicate them.

Share user crash and energy data with developers: Users need to share crash and energy data with developers for Apple to create reports.

If no crash or energy reports appear in the organizer: If you don’t see crash or energy reports in the organizer, follow these steps to fully enable the report service for your app.

Supported crash reports: The availability of crash reports depends on the type of target, the device operating system release, and Xcode release.

Supported energy reports: The availability of energy reports depends on the type of target, the device operating system release, and Xcode release.

Perform continuous integration

Continuous integration using Xcode Server: You can use Xcode Server to manage your team’s continuous integration workflow that automates building, analyzing, testing, and archiving your apps.

Configure Xcode Server

Set up Xcode Server: You set up Xcode Server by turning the server on, choosing a system account to run the server, and logging in to that account.

Start or stop Xcode Server: You can start and stop Xcode Server in Servers & Bots preferences.

Add Xcode Server to your accounts: If Xcode Server is running on another Mac, add it to your accounts so you can start using continuous integration.

Share schemes with Xcode Server: You can share a scheme with Xcode Server when you create a bot or later when managing schemas.

Create a bot: You create a bot to perform continuous integrations.

Configure bots

Bot scheme and action settings: You choose the scheme and configure the actions you want the bot to perform.

Allow Xcode Server to manage signing for you: When you create a bot, you can choose whether to allow Xcode Server to manage signing for you.

Create bot triggers: You can configure a bot to perform actions called triggers.

Configure a bot to run your app on multiple server devices: You can configure a bot to run your app on multiple devices connected to your continuous integration server.

Configure a bot to create distribution-signed iOS App (IPA) files: You can configure a bot to create distribution-signed iOS App files for uploading to iTunes Connect or distribution outside of the App Store.

Xcode Server environment variables: You can use Xcode Server built-in environment variables in Run Script build phases.

Duplicate, edit, and delete bots: After you create a bot, you can duplicate, edit, and delete it in the Report navigator.

Run, cancel, and delete integrations: In the Report navigator, you can run, cancel, or delete an integration.

View bot and integration results: You can view bot summary and integration results in the Report navigator.

Reference

Build settings reference: A detailed list of individual Xcode build settings that control or change the way a target is built.

Configuration Settings File (xcconfig) format reference: Reference information for properly forming Configuration Settings File (xcconfig) files.

Text Macros

Text macro format reference: A description of the text macro format.

Text macros reference: A description of the built in text macros.