How To Develop iOS Apps On A Windows PC

Written by Reinder de Vries on June 21 2018 in App Development

How To Develop iOS Apps On A Windows PC

How can you develop iOS apps on a Windows PC? The short answer is… you can’t! There are plenty of options to get around that, however. Let’s find out in this article!

The problem is Xcode, the Integrated Development Environment (IDE) you use to design, develop and publish iOS apps. Xcode includes the Swift compiler, Interface Builder, and tools to upload your app to the App Store. Xcode contains everything you need to build iOS apps, and it only runs on Mac!

And that’s where the problems start. You want to make an iOS app with your Windows PC, but you can’t buy any PC or laptop with OS X (now called macOS) on it. Because unlike Windows, Apple doesn’t license its operating system to other computer manufacturers. When you obtain a license to use macOS, you have to agree to only run the operating system on Apple hardware. This effectively limits you to only develop apps on a Mac.

But… it’s more fun to be a pirate, than to join the navy, right? So let’s figure out how you can develop iOS apps on a Windows PC!

  1. Use VirtualBox and Install macOS on Your Windows PC
  2. Rent a Mac in the Cloud
  3. Build Your Own “Hackintosh”
  4. Develop iOS Apps on Windows With Cross-Platform Tools
  5. Get A Second-Hand Mac
  6. Code with a Swift Sandbox
  7. Further Reading

1. Use VirtualBox and Install macOS on Your Windows PC

The easiest way to develop iOS apps on a Windows PC is by making use of a virtual machine. A virtual machine will create an environment an operating system can run in, as if it’s running on the hardware itself.

This is called virtualization, and it allows you to run Windows on Linux, macOS on Windows, and even Windows on macOS.

To run macOS on a virtual machine, you need two things:

  1. A copy of macOS, as an installer or virtual image file
  2. A virtual machine tool, like VirtualBox (free) or VMware (paid)

You can obtain a copy of macOS by downloading it from the App Store or by borrowing it from a friend. You can also find installers from various sources on the internet.

You then install VirtualBox, and “mount” the macOS installer in a new virtual machine. You can read exactly how in this tutorial.

The recommended system specs are: 4-8 GB of RAM, an Intel i5 or i7 compatible CPU, and at least 10 GB of free disk space.

Keep in mind that using macOS on non-Apple hardware is against Apple’s End User License Agreement (EULA). (Fun fact: the same EULA prohibits the use of macOS to manufacture missiles or nuclear weapons…)

Learn how to code iOS apps

Get started with Xcode and Swift

Ready to get started with iOS development? Learn how to code iOS apps with Xcode and Swift with our immersive iOS development course. Works both on Mac and PC!

2. Rent a Mac in the Cloud

An even easier way to get your hands on macOS, albeit more expensive, is to rent a Mac in the Cloud.

The idea is simple:

  • Someone else has a bunch of Macs, and connects them to the internet
  • You sign in on one of those Macs with a Remote Desktop Connection (RDP)
  • Done! You can use this Mac from a Windows PC, from anywhere!

Services like MacinCloud and MacStadium offer affordable rent-a-Mac products, usually paid on a monthly basis. Prices typically start at $20/month and you can choose from several hardware options, including Mac Mini and Mac Pro.

You connect to those cloud-based Macs via a Remote Desktop Connection (RDP). Windows includes a stock Remote Desktop Client you can use, and so do most Linux operating systems. Once you’re logged on, you can install Xcode, and start building your app.

Cloud-based Macs usually come in three flavours:

  • A dedicated Mac, which means you get access to a physical Mac located in a data center, as if you bought a Mac in the Apple Store and put it on your desk
  • A virtual Mac, which means you get access to a virtual Mac in a data center, much like the VirtualBox solution mentioned earlier. Your Mac won’t run on Apple hardware, but it will run macOS.
  • A Mac Build Server, which is a specialized kind of Mac that can be used to compile iOS apps. You’ll create those apps on your local PC, and then instruct the Build Server to compile the app for you.

A Mac Build Server is most suitable for enterprise level applications, or for multi-person teams. Build Servers come in handy for Continuous Integration (CI) practices, but it’s not a practical solution if you’re just looking to develop an app on a Windows PC.

Running a Mac in the cloud has one major drawback: you can’t connect your physical iPhone to Xcode. With Xcode, you can run and debug your app directly on your iPhone if you connect it with a USB-to-Lightning cable. Since your Mac is in the cloud, that’s pretty much impossible…

A solution is of course to run your app on iPhone Simulator, right from within Xcode. You can then try out your app and debug it. When you want to run the app on your iPhone, you simply install it via TestFlight. If you install a tool such as Crittercism of Crashlytics, you can even monitor and debug live crashes.

An interesting use case for renting a Mac in the cloud comes from the latest developments in Apple’s hardware. Many designers, developers and desktop-publishers have voiced their concerns over Apple hardware lagging behind, offering low-specs computers for a fairly high price.

If you don’t want to take your $2500 development machine with you in a coffee shop, or on your next trip to Thailand, why not purchase a low-end Windows or Linux laptop, and connect to your Mac in the cloud? You can either host it at home yourself, co-locate it in a data center, or rent a dedicated Mac in the cloud.

Do you want to learn how to code iOS apps, but don’t want to invest in a Mac? Rent a Mac in the cloud for the duration of the iOS development course you’re taking!

3. Build Your Own “Hackintosh”

The most obvious choice to develop iOS apps on a Windows PC is perhaps to literally install macOS on a Windows PC…

“One platform to rule them all” has always been Apple’s take on the world. The Mac, App Store, iOS and even iTunes are all closed systems.

Apple enthusiasts have always enjoyed the integrated Apple experience, product design, and interconnectivity. You don’t go to a fastfood restaurant chain, and order a-la-cart custom toppings, right?

On the other hand, the rest of the world builds computers using an “open systems architecture”, in which you can effectively mix-and-match computer components and architectures to create your preferred computing machine.

Building $10.000 gaming PCs, mid-level desktops, blazing-fast ultrabooks, and $250 laptops is only a possibility because of open hardware.

But… what if you want to run macOS on your custom built PC? Apple won’t let you, and your computer manufacturer can’t install macOS for you, even if they wanted to.

Enter the “Hackintosh”.

A Hackintosh is a PC that runs macOS. Just like you can install macOS in a virtual machine, or in the cloud, you can install macOS as the bootable operating system on your PC. Switch it on, and macOS loads.

You can also create a dual-boot, i.e. a system that both hosts Windows and macOS. When you boot your PC, you can select the operating system that starts.

Building a Hackintosh can be a tricky exercise, especially if you’re not familiar with PC hardware and creating custom installations. Not all hardware is compatible with macOS. Moreover, Apple has of course created safe-guards against booting macOS on unsupported hardware.

Nevertheless, it’s a good option for running macOS on your custom hardware, and booting macOS on your Windows PC. Check out hackintosh.com for more information, and step-by-step guides.

The name “Hackintosh” comes from the old brand-name of Apple computers: Macintosh, combined with “hack”. Again, it’s against Apple’s EULA – but you wanted to be a pirate, right?

4. Develop iOS Apps on Windows With Cross-Platform Tools

Cross-platform tools are awesome: you code your app once, and export it to iOS and Android. That could potentially cut your app development time and cost in half. Several cross-platform tools allow you to develop iOS apps on a Windows PC, or allow you to compile the app if there’s a Mac in your local network.

Well, not so fast…

The cross-platform tool ecosystem is very large. On the one side you have complete Integrated Development Environments (IDEs) like Xamarin, that allow you to build cross-platform apps with C#.

The middle ground is covered by tools like PhoneGap, Cordova, Ionic and Appcelerator, that let you build native apps with HTML5 components. The far end includes smaller platforms like React Native that allow you to write native apps with a JavaScript wrapper.

The one thing that stands out for all cross-platform tools is this: they’re not beginner friendly! It’s much easier to get access to a Mac, learn Swift, and build a simple app, than it is to get started with Xamarin.

Most of the cross-platform tools require you to have a basic understanding of programming, compilation options, and the iOS and Android ecosystems. That’s something you don’t really have as a beginner developer!

Having said that, let’s look at a couple of options:

  • If you’re familiar with Windows-based development tools and IDEs, and if you already know how to code, it’s worthwhile to check out Xamarin. With Xamarin you code apps in C#, for multiple platforms, using the Mono and MonoTouch frameworks.
  • If you’re familiar with web-based development, check out PhoneGap or Ionic. You’ll feel right at home with HTML 5, CSS and JavaScript. Don’t forget: a native app works different than a website…
  • If you’re familiar with JavaScript, or if you’d rather learn to code JavaScript than Swift, check out React Native. With React Native you can code native apps for iOS and Android using a “wrapper”.

Always deliberately choose for cross-platform tools because it’s a smart option, not because you think a native platform language is bad. The fact that one option isn’t right, doesn’t immediately make another option smarter!

If you don’t want to join the proprietary closed Apple universe, don’t forget that many cross-platform tools are operated by equally evil companies like Google, Facebook, Microsoft, Adobe and Amazon.

An often heard argument against cross-platform tools is that they offer limited access to and support for smartphone hardware, and are less “snappy” than their native counterparts. Keep in mind that any cross-platform tool will require you to write platform-specific code at one point, especially if you want to code custom features. \[cta_alert\]

5. Get A Second-Hand Mac

You gotta ask yourself – why not get a Mac? Perhaps the easiest option in this post is simply purchasing a Mac.

If you don’t want to tinker with cross-platform tools, rent-a-Mac in the cloud, and simply want to get started: get a Mac.

A simple search on Ebay shows you 1-3 year old second-hand Mac Mini’s for as little as $250. Any newer, decent second-hand Mac Mini will set you back around $450. Don’t forget that you can get a brand spankin’ new Mac Mini for $500.

A better question is perhaps: is a 2011 4GB Mac Mini fast enough to build apps with?

Well… get a load of this: I’ve built 50+ apps for iOS, Android and the web since 2009, and a fair share of those were built on a 1.2 Ghz 8GB MacBook Air from 2013. I’m currently writing this post on the same MacBook, and I’ve coded several successful production apps with it in the past 12 months.

It’s traveled with me all over the world, from the beaches of Thailand, to airline lounges, to coffee shops, to coding apps with my knees behind my ears, cramped in cattle class at 20.000 feet up in the air.

I don’t want to go all nostalgic on you, but I learned to code on a 100 Mhz i486 PC, when lines still started with a number. That’s a lot faster PC than the one that put man on the moon, at 46 Khz.

So, to say that a Mac Mini, or your new 2015 MacBook Pro, is fast enough, is an understatement…

6. Code with a Swift Sandbox

So… do you really need Xcode to code apps? Ultimately, yes. Before you finish your app, however, you’ve learned to code, and you can do that right here, right now, without Xcode!

Swift is an open-source language, and that means you can effectively run it on any hardware. Therefore, you can also run it in your browser – provided someone has ported the language to Chrome, Safari or Firefox.

A great implementation exists already: the Swift Sandbox! The iOS development course here on LearnAppMaking includes access to our private Swift sandboxes. You can use these Swift Sandboxes to code Swift right in your browser.

The IBM Swift Sandbox is unfortunately discontinued, but you can use online.swiftplayground.run by Marcin Krzyzanowski to code Swift in your browser too.

Learn how to code iOS apps

Get started with Xcode and Swift

Ready to get started with iOS development? Learn how to code iOS apps with Xcode and Swift with our immersive iOS development course. Works both on Mac and PC!

Further Reading

You can’t build iOS apps without Xcode, and you need macOS to run Xcode, and a Mac to use macOS. There’s no getting around it, except for…

  1. Using virtualization to install macOS on a virtual machine
  2. Rent a Mac in the cloud (surprisingly affordable!)
  3. Build your own “Hackintosh” by installing macOS on a PC
  4. Developing apps on Windows with cross-platform tools
  5. Getting your hands on a second-hand Mac (starting at ~ $300)
  6. Learning to code with a Swift Sandbox

Awesome! I want to wish you best of luck with building your iOS app on Windows. If you have questions, please leave a comment below.

Reinder de Vries

Reinder de Vries

Reinder de Vries is a professional iOS developer. He teaches app developers how to build their own apps at LearnAppMaking.com. Since 2009 he has developed a few dozen apps for iOS, worked for global brands and lead development at several startups. When he’s not coding, he enjoys strong espresso and traveling.