Lesson: Set up Xcode service
This lesson assumes you’re a developer, you have Xcode installed on a Mac, and you have a code repository (specifically a Git repository) already hosted somewhere.
In this lesson, you'll learn how to:
Set up Xcode service
Host a Git repository
Configure Xcode to interact with Xcode service
Create a nightly build bot
Check the bot’s output in the web app
Step 1. Download and install Xcode on the server
To use Xcode service, you must first install Xcode on the server, if it’s not already installed.
Download Xcode from the App Store and install it on the server.
Step 2. Use the Server app to configure Xcode service
Open the Server app to see the list of services available in OS X Server. Select Xcode.
Click the Choose Xcode button, then select Xcode in the Applications folder. Xcode service starts automatically.
Step 3. Create a Git repository
Xcode service bots access projects and code from your source Git repository.
Click Repositories, then click the Add button . Choose a name for the Git repository, and click create.
The URL of the repository is based on the server host name and the repository name. For example, the URL for the repository would be https://myserver.example.com/git/Mac_Calc.git.
If you have an existing Git repository, use Xcode to copy the files up to the newly hosted repository.
Step 4. Turn on the service.
Click the button to turn on Xcode service.
Step 5. Open Xcode and add the server to the Accounts preference
Xcode 5 can connect to servers running Xcode service.
In Xcode preferences, click Accounts, then click the Add button to add a server account.
Then select the server and log in using your server account.
Step 6. Create a nightly build bot
Check out the project in Xcode, if you haven’t already done so.
You can also use Xcode service’s web app to create bots.
In the project, make sure the Scheme you’re using is Shared.
If it’s not shared, Xcode will offer to share it.
Choose Product > Create Bot, then follow the onscreen instructions.
Choose the scheme and the server (myserver.local in this tutorial). Enter a name for the bot (Mac_Calc Bot), then click Next.
Enter authentication settings for your repository, if needed.
Enter the schedule and action settings.
Use one of the following schedule settings: Periodically, Daily, at midnight. Select only the Perform archive action.
Enter email settings.
Leave the failure email notification checkbox selected, and add your email address to the failure notification list.
Click Create Bot.
Step 7. View the bot report in Safari
Open Safari, go to https://myserver.local/xcode/, then select the bot in the list of bots.
Step 8. Run an integration in Xcode with the bot and view the results in Safari
In Xcode, start the integration action before the scheduled time by clicking the Integrate button.
You’ve learned how to set up Xcode service, create a bot, and use Safari to monitor the bot’s progress.
Where to go from here
There’s still a lot to learn about software development and integration workflows. You can learn more about those and the Xcode app at the Apples Developer website.
You can learn more about continuous integration in the Xcode Continuous Integration Guide.
You can find out more about Xcode service in Server Help.
You might also want to learn how to access a private network securely over the Internet; see the Configure public access tutorial.