In the fifth version of Xcode, Continuous Integration appeared. It works through Xcode service OS X Server ($ 20,
AppStore ).
XCode Service can do the same as any Continuous Integration server, perhaps a little less. A huge plus is full integration with XCode and Apple’s out-of-the-box work. I started the auto-build project for half an hour, although I had never set up a CI server before. And there is no need to smoke manuals on how to build the application correctly from the command line, how to turn on the emulator or run tests on the device.

')
Xcode Service automation work done by
bots . Bot
- Retrieves a project from GitHub or SVN.
- Conducts statistical code analysis.
- Builds a project, common schemes are used for picking, they are created via Xcode and stored in the repository.

- It performs Unit tests, unit tests are also built into Xcode, tests can be performed on any device connected to the CI server and on any installed emulator.

- Anyone who commits to the repository alerts about a failed build or testing.
Build the project runs on time, manually or after each commit.
Detailed installation instructions
on the Apple website .
Setup takes 30 minutes. Very pleased that everything works out of the box and integrated. Unit tests and bots are created in XCode, there are also beautiful reports on test execution and build.
And a couple of useful recipes.
Upload to Test Flight
In the Archive section of the schema we add approximately the following Post-Action
curl http://testflightapp.com/api/builds.json -F file=${BUILD_ROOT}/Debug-iphoneos/${FULL_PRODUCT_NAME} -F api_token='your_api_token' -F team_token='your_team_token' -F notes='This build was uploaded via the upload API' -F notify=True -F distribution_lists='Internal, QA'
UI testing
Unfortunately, automated UI testing via standard
UIAutomation cannot be run on a build server (well, generally
it is
possible , but the java script and its glitches nullify the benefits).
I recommend UI testing via
KIF . It is transparently embedded in XCode Test Navigator and executed by bots.
Subscribe to our
blog . Every Thursday, useful articles about mobile development, marketing and business of mobile studio.