Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building iOS project with Jenkins on Ubuntu Linux

Tags:

I have installed Jenkins in Ubuntu and while I am trying to build an iOS app in Jenkins the below error occurs:

FATAL: Cannot find xcodebuild with the configured path /usr/bin/xcodebuild.

like image 310
kirthan shetty Avatar asked Jul 14 '15 11:07

kirthan shetty


People also ask

Can I develop iOS apps on Ubuntu?

Even if you don't own a Mac, you can work on iOS development on Ubuntu by using third-party tools (like a sandbox or a virtual machine).

Can Jenkins build iOS apps?

In order to build iOS applications you will need to run the server on a macOS machine. You could install Jenkins directly on a Mac computer, but our preferred way is to have a small Mac mini machine* in our office devoted to these tasks.

Can you build an iOS app on Linux?

Being an iOS developer, you know that using Xcode (IDE), you will be able to develop iOS mobile apps. However, Xcode only runs on a Mac computer. Thus, you need different ways to develop iOS applications on Linux. For developing an iOS app on Linux, you need virtualization software.


2 Answers

As of Xcode 11, there is not a way to run the Xcode build tools on an operating system other than macOS. The minimum system requirements can be found here.

like image 24
dapperdan Avatar answered Sep 23 '22 10:09

dapperdan


The xcodebuild tool is part of the Xcode SDK from Apple — it's only available for download on Mac OS X.
You cannot simply use the official iOS tools to build on a computer that isn't running OS X.

This means that, if you have a Jenkins job which builds an iOS app, it must be built on a Mac.

This does not mean, however, that Jenkins must be installed on a Mac. Jenkins supports distributed builds, whereby you can have multiple machines, with different operating systems, and you can instruct Jenkins on which machine a certain build should run.

For example, as you already have a Ubuntu machine as your Jenkins master server, you can simply add a Mac as a build node. The Jenkins master would then communicate with the build node (Mac) via SSH. In the configuration for that build node, you should add a label, e.g. "xcode", to signify that the Xcode SDK is installed.

In the Jenkins job configuration, there is an option called "Restrict where this project can be run", where you can tell Jenkins that it may build this job only on a node with a given label. In this case, you would just enter "xcode", and the job would always be built on an appropriate Mac, rather than on the Ubuntu machine.

like image 71
Christopher Orr Avatar answered Sep 26 '22 10:09

Christopher Orr