Install OS X Server and Configure Xcode Server
To use Xcode Server, you need to install and configure OS X Server and Xcode on a Mac. You can then write code on a development Mac and allow the server to perform continuous integrations of your software products on a schedule, whenever you commit a change to a source code repository, or manually as needed.
Xcode Server advertises itself over Bonjour on your local network. If you and other team members will access Xcode Server from your local network only, you can use Bonjour to find Xcode Server. If you need the service to be visible more broadly, ask your DNS server administrator to add records for your Mac running OS X Server to a DNS server. After these records are added, users can access the server by its host name, such as server.mycompany.com
. If your intranet doesn’t have a DNS server, you and others can access the server by its local hostname, such as server.local
.
Download OS X Server and Xcode
Before configuring Xcode Server, you must download and install OS X Server and Xcode on a Mac. To ensure compatibility between components, it’s a good idea to install any system updates too.
Open the App Store on the Mac that will be your server, and search for OS X Server.
Download OS X Server from the App Store.
After your download is complete, launch the OS X Server app, simply named Server, in
/Applications
or Launchpad.When prompted, click Continue in the Server setup window to begin setting up the server (or click Help to see detailed setup instructions).
Follow the onscreen instructions to complete the installation.
After you enter the user name and password of an administrator account on your Mac, the Server app installs the software it needs and configures your Mac to operate as a server.
Open the App Store on the Mac that will be your server, and search for Xcode.
Download Xcode from the App Store.
After your download is complete, launch Xcode in
/Applications
or Launchpad.If prompted, enter your administrator account credentials in order to configure Xcode.
Set Up Xcode Server
With OS X Server and Xcode installed, you’re ready to configure and enable Xcode Server. This is done within the Server app.
Launch the Server app (if it’s not already running).
You can click the Launchpad icon in the Dock and then click Server.
In the Services list in the Server app sidebar, select Xcode.
Click Choose Xcode, and select Xcode.
The first time you enable Xcode Server on a particular Mac, the service asks you to identify the Xcode release it should use to perform its tasks. If you need to identify a different Xcode release in the future, click Choose Xcode again.
Select a user account Xcode Server can use for performing integrations. This can be the current user account, or you can create a new one.
To create a new account, select “New user account” and enter a full name, account name, and password. If desired, enable administrative privileges. This may be necessary for performing certain types of automated testing. When you’re done, click Create User.
If the chosen account is not logged in yet, click Log In and enter the account’s credentials. Xcode Server requires a logged in user to operate.
In the Services list in the Server app sidebar, select Xcode.
Click the On/Off switch at the top of the
The Xcode Server menu bar item indicates when Xcode Server is running and performing operations.
Add your server to a team in your developer account to allow Xcode Server to access your developer account assets, such as provisioning profiles and signing certificates to build products for iOS devices. This is necessary if you plan for Xcode Server to test iOS products and conduct performance testing on iOS devices. Note that you must be an admin or the agent of the team you want your server to join. For information about developer team roles, see Managing Your Developer Account Team in App Distribution Guide.
In the Services list in the Server app sidebar, select Xcode.
In the Xcode pane, click the Settings tab.
In the Settings pane, click Add Team.
Sign in with your Apple ID.
Choose a team, if applicable, and click Add.
The Server app connects to your developer account and downloads its own set of certificates, private keys, signing identities, and provisioning profiles for apps that are registered with your team.
After adding a team to Xcode Server, you can add iOS development devices for use when running performance tests.
In the Services list in the Server app sidebar, select Xcode.
Connect the device to the server, and wait until it appears in the Devices list.
Click the “Use for Development” button next to the device in the list.
A device cannot be used for performance testing until it has been provisioned. If the device has not been provisioned for the team associated with the server, click the “Add to Team” button to add the device to the team.
To view a device’s information, such as the teams assigned, model, serial number, and software version, select the device in the list and click the Edit button.
Set Up Xcode Server for Team Members
If you are part of a team of developers, you can give the members user accounts on the server. This will enable them to create and manage bots, share and manage source code repositories, and use other services in OS X Server.
In the Accounts list in the Server app sidebar, select Users.
For more details about creating user accounts, click the Help button in the lower-right corner of the Users pane.
Click the Add button (+).
In the New User pane, enter the user’s account information.
Click Create.
You can also add and manage groups of user accounts by selecting Groups (under Accounts) in the Server app sidebar. For more details, click the Help button in the lower-right corner of the Groups pane.
On their development Mac computers, team members can add their account credentials for the server by using Accounts preferences in Xcode.
Anyone running Xcode who has access to the server can potentially create and view bots. You can, however, restrict which users have access to bots by clicking the Edit button in the Settings pane in Xcode Server.
In the Services list in the Server app sidebar, select Xcode.
In the Xcode pane, click the Settings tab.
Under Access in the Settings pane, click the Edit button for Permissions.
Choose which users can create and view bots.
If you choose “all users” from the “Bots can be created and viewed by” pop-up menu, guests and every authenticated user can view bots, create, edit, and delete bots, and download items. The option “logged in users” includes local users and directory users, all of whom need to authenticate to have access to bots. Clicking “only some users” allows you to specify existing users or groups.
If you chose to restrict bot creation, you can also choose to restrict view-only access to bots.
Users with view-only access can view your Xcode Server website (see Monitor Bots from a Web Browser) and initiate integrations, but they can’t create or manage bots. People who particularly benefit from having view-only access to bot activity are software testers, project managers, and seed coordinators.
Click OK.
Set Up Your Development Mac to Access Xcode Server
You can add an account for the server to your development Mac. Once added, you can create bots to run your integrations, initiate integrations, and check the status of bots in the Xcode report navigator. You can also create new projects and host them in Git repositories on the server.
On your development Mac, choose Xcode > Preferences.
Click Accounts in the toolbar.
Click the Add button (+), and choose Add Server.
Select the server from the server list or enter a server address, then click the Next button.
Specify your connection credentials for the server, and click Add.
If the server is successfully configured, you can click the server address link in Accounts preferences in Xcode. Safari opens and shows the bots website hosted by the server, as discussed in Monitor Bots from a Web Browser.
About Continuous Integration in Xcode
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-09-13