Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - command line build iOS project

I have an iOS project cloned from repo into my jenkins account. Xcode is not yet installed. I know command line scripts to build an iOS project including targets/configurations/profiles etc. Certificate and provisioning profile is installed in jenkins account. I am wondering if there is a way to build and create ipa without installing Xcode in jankins account. Does apple provide any developer tools for building and creating IPA through command line only?

Advance thanks

like image 533
Sazzad Hissain Khan Avatar asked Feb 16 '26 16:02

Sazzad Hissain Khan


1 Answers

Every building option for iOS apps requires Xcode, but apple does provide tools for building via CLI. A ton has changed in the most recent iOS OS upgrade and there are incredible tools out there for CI/CD app delivery. What you end up using should really depend on what you want to maintain over time and how advanced your system needs to be.

To get Builds working in Jenkins

Step 1 : Install Xcode on the Jenkins node that will be doing the builds. You wont be using the Xcode UI but you will need it installed, there is currently no way to build IPAs without Xcode.

Step 2: Choose your build tool

  • You could write your own build scipts and manage provisioning profiles on the machine. xcodebuild is the CLI tool you are looking for. If you end up going down this route make sure to use xcpretty or you will loose your mind with giant build logs.
  • Fastlane is an amazing toolset for building mobile apps, it might change your life. Check out these examples and how to get started.
  • Apple has an xcode build server that Jenkins could possibly talk to.

The first two in this list do a good job of managing provisioning profiles out of the box, and that can save you major headaches down the road if you need to scale

like image 122
Stefan Crain Avatar answered Feb 19 '26 12:02

Stefan Crain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!