How to build iOS apps on a PC

Want to develop iOS apps? You will most likely need a Mac. If for any reason you don’t have a Mac, no worries! There are some workarounds you can do to run Xcode on a PC.  

What is Xcode and why do you need it?

Xcode is a software program designed specifically for macOS. It’s also known as an integrated development environment that allows creating and publishing applications for Apple products. 

This tool provides a host of features that are indispensable for building great iOS apps. These include a source editor, an asset catalog editor, Interface Builder, a version editor, complete documentation, powerful compilers, and many more. The only thing that you may find disappointing is that you can’t run it on operating systems other than macOS.  

The challenge 

Say you want to write applications for iOS, but you are not a Mac fan and are using a PC. The bad news: Apple does not allow their OS to be run on non-Apple machines. That means you can’t get a PC-compatible version of macOS. The good news: if you can't get hold of any Mac, you can try running Xcode on Windows using an alternative method described below.  

The solution

One of the most common ways to work with Xcode on Windows is by renting a Mac remotely in the cloud. This will let you access a cloud-based Mac with macOS without having a real Mac in your hands.  

“How-to” guide:

Cloud-based rent-a-Mac services are typically offered under monthly plans with prices starting from $20/month (services like MacinCloud and MacStadium). Depending on your needs, you can select between different hardware options, e.g. a Mac Mini, a Mac Pro, etc.  

Given that Windows comes with a built-in Remote Desktop Client, you can utilize it to create a Remote Desktop Connection to your cloud-based Mac. Once connected, it’s easy to start Xcode and begin (or continue) to develop your iOS app. 

In-cloud Mac services usually offer one or several of the following options:

  1. You rent a dedicated Mac that provides access to a real Mac computer placed in a remote data center.
  2. You rent a virtual Mac which allows you to work with macOS without having access to real Apple hardware.
  3. You use a Mac Build Server that is configured to compile iOS apps you have already built on your Mac.  

In terms of convenience and performance, a dedicated Mac is probably the best choice. A virtual machine is not bad but is not as powerful as a real Mac. 

Despite its many advantages, renting a remote Mac has its limitations. Probably the most critical one is the inability to connect your iOS device to Xcode over USB. What you can usually do when running Xcode on your local Mac is test your app on an iPhone or an iPad connected to your computer with a USB or a Lightning cable. This scenario does not seem possible with a cloud-based Mac. Instead, you can try one of these alternatives:  

As you can see, renting a Mac in the cloud could save you significant time and money. It eliminates the need to purchase a pricy Mac or Macbook and lets you run Xcode even on a low-end Windows or Linux computer. 

Now let’s take a look at another example of how to use a remote connection for iOS app development.

For quite a long time I’ve been creating my own software on a Windows-based laptop with various operating systems running on several virtual machines. 

My laptop runs Windows 10, and virtual machines run different versions of Windows and Linux. I also use a Mac Mini that works on 10.15.

When I’m not at home, I use my laptop and connect to other machines remotely over OpenVPN.

To establish a high-quality USB connection between my iPad Pro, Pixel 4a, Nokia 8.3, and the Windows-based laptop I use a third-party app called USB Network Gate. It allows me to access my devices from any machine (real or virtual) remotely no matter their physical location.

Thanks to the ability to connect USB devices to my laptop remotely, I can build mobile applications in the native environment over NoMachine remote desktop. 

That’s how it works: iPad/Pixel → My laptop (Windows 10) → OpenVPN → USB Network Gate and NoMachine → ESXi or Mac Mini → native environment on virtual machines – OS or macOS.