Many Unity3D developers use Windows, and when building a game for iOS, there are many problems and dances with a tambourine around OS X virtual machines.
The guys from the unit have made us a big step forward: they gave the opportunity to build builds for various devices in the cloud, absolutely not paying attention to what device we are working on.
The logic of work is as follows:
')
1. Perform initial setup
2. Fill the project sources into the version control system
3. Create a special branch for the build and fill it with the current version of the game
4. The cloud extorts this version and builds

Here is how it is done:
Choosing a version control system, git mercurial svn perfoce is now supported. I tried everything and stopped at mercurial. We create a repository and upload our source files to the selected hosting.
I will omit the choice of the system, the creation of the repository and other basics of working with the version control system, there are enough articles on this topic on Habré.In the repository, create a branch for the builds from which Unity Cloud will download the source code and upload the working version into it. Install the latest version of Unity3D and click on the button with the cloud, then go through authorization on the Unity cloud and create a new project:

Go to the Cloud Build section and click on the external link:

We will get to the web project management interface, I switched to a new beta version:

We specify the address of our repository, its type and user to connect:

Next, select the platform under which the build will be built, in our case ios:

We fill in the information about the build, it is important to note the Branch section in it the name of the branch from which the source code for the build will be downloaded is indicated.

In the next step, we will need a computer with OS X, we will need to get a certificate, .mobileprovision and specify the Bundle ID:

Let's take a look at the order, the Bundle ID can be found at
itunesconnect.apple.com/ :

You need to create a developer p12 certificate in advance using xcode, there are plenty of instructions and I will not describe them here, I will only indicate where to download them. Finding a machine with OS X or using a virtual machine with this OS, you need to go to the site
https://developer.apple.com , then in the section
Certificates, Identifiers & Profiles . Next, select the certificates section:

In the
Provisioning Profiles section. In the
All section, download our
iOS Distribution certificate. On OS X, open it and add it to the login / login section:

In the Keychain Access application in the left column, select the sections
Login and
My Certificates . Select our certificate and click
File -> Export Items ... In the export window that appears, you need to make sure that the format is selected
Personal Information Exchange (.p12) . Next, you will create a password for the certificate, which you will specify in the Unity Cloud Build when you add it.
Now create a .mobileprovision file. We also go to the portal
https://developer.apple.comWe are interested in the
iOS Provisioning Profiles section, in it we click on +

And choose one of these options, one for publication in the App Store, the second for testing on testers' devices:

Next, we select the developer’s account, the application and the list of devices for testing, and in the end we get the coveted download button.
The next step is to upload the received mobileprovision and certificate to the Unity Cloud Build and specify its password. If you have done everything correctly, the message start building will appear and in the list of projects there will be an entry about the current state of the build:

That's all, at the end of the build you can get detailed information about its progress. In the next article I will describe working with the rest of the Unity3d cloud services.