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 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.

Leave a Reply

Required to post: Your real name and email address, and a pleasant demeanor. Your email address will not be published. Markdown is supported.

  • Great article!

    Just one question...after installing macOS on VirtualBox/VMWare, can we connect iPhone device through the USB port of the Windows machine(accessing the virtual machine instance) to deploy and run the iOS app build?

    1. Reinder de Vries October 9, 2018 09:56 in reply to Sandeep

      I'm not 100% sure, but with VirtualBox you should be able to access host peripherals like USB from the virtual machine.

  • Fantastic article!! definitly going on the favorite list. My question is regarding the virtual machines. If i loaded one onto my pc, would it also have the reduced functionality as if i has dual booted onto it? would i have to make sure i had an intel processor etc and would i have to tell it what i have and where it is? Thanks!

    1. Reinder de Vries September 21, 2018 11:39 in reply to Jon

      A virtual machine's hardware is more standardized than using a dual boot setup. I'm not 100% sure, but I don't think macOS runs on anything else than Intel CPUs (virtualized or not). With a dual boot or Hackintosh you're closer to the hardware than a virtual machine, but you have the disadvantage of finding drivers for your hardware. So either way isn't ideal, and always slower than an actual Mac, but it might just work OK for you.

  • Those interested in cross platform development might take a look at LiveCode and Xojo. They both have limitations, but may be viable alternatives for simpler projects.

    1. Reinder de Vries September 17, 2018 20:10 in reply to Michael

      Great idea. I've also found Buildbox to be quite an interesting alternative for building games.

  • Great explanation on how the Mac App World works for an PC developer. Seriously thinking join the course asap.

    1. Reinder de Vries August 19, 2018 11:50 in reply to Jose

      Thank you! Looking forward to welcoming you in the course.

  • Claire Bellmonte August 9, 2018 08:28

    The fact that one option isn’t right, doesn’t immediately make another option smarter! Just like I can install macOS on 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.

    1. Reinder de Vries August 9, 2018 10:09 in reply to Claire

      It's not that simple. Installing macOS next to Windows on your PC, as a bootable OS, means that you'll have to shut down Windows before booting macOS, and vice versa. There's also no good way to directly share files between Windows and macOS, except externally. And macOS doesn't support all PC hardware. If you want to build iOS apps, and Windows is your main OS, then working with macOS as a virtual machine or in the cloud is the most convenient option. You can share files with the host OS, boot it right inside Windows, and the hardware is virtualized.

      —Reinder

  • Hi Reinder,

    Thank you for your wonderful article. Reading thru it though, I'm almost convinced that buying a MAC is the ultimate efficient solution. Now, once an app is built using Xcode / Swift using a MAC, is there an easy way to translate it to Android without having to re-write the Code using JavaScript or C#?

    1. Reinder de Vries July 16, 2018 21:55 in reply to Alex205

      Thanks! That's great to hear.

      You can't easily translate between iOS (Swift) and Android (Java/Kotlin), because they're entirely different languages and platforms. You can, however, use cross-platform tools like React Native, Ionic, Xamarin and PhoneGap to code an app for multiple platforms with one codebase. It's a bit more involved than "write once, deploy twice", but React Native for instance lets you use shared components between platforms, and code JavaScript instead of platform-specific languages. These tools have their drawbacks, and I don't recommend going the cross-platform route if you don't yet have experience with at least one native development environment or programming language.

  • Seanna Lea July 10, 2018 16:59

    Can Xcode 4.2 be used to build apps that work on the current version of iOS?

    I have an old MacBook Air (2008) that cannot use a current version of the macOS or Xcode.

    1. Reinder de Vries July 10, 2018 17:29 in reply to Seanna

      No, unfortunately not. Xcode 4.2 supports iOS 5 at most. We're currently at Xcode 9 and iOS 11, so your hardware is from quite a few years back. Swift wasn't even around back then! I recommend you upgrade your Mac.

      1. Seanna Lea July 10, 2018 17:44 in reply to Reinder

        I figured that would be the answer. Thankfully I have time before my course in the fall to try and pick another alternative.

  • Your article was really helpful. Keep it up !

  • your write ups are great ...

    1. Reinder de Vries May 23, 2018 13:34 in reply to Eliab

      Thanks! Much appreciated :-)

  • Excellent article. I certainly appreciate this site.
    Keep it up!

    1. Reinder de Vries May 21, 2018 10:59 in reply to Website

      Thanks! Glad you like it :-)

  • Harvey Specter March 23, 2018 10:57

    is that really possible to develop an ios app with windows. so is it still possible todevelope ios11 apps on ongoing windows platform?

    1. Reinder de Vries March 23, 2018 11:26 in reply to Harvey

      It's exactly like the article says: you can't develop iOS apps on Windows because Xcode only runs on macOS / Mac. What you can do, however, is install macOS on your PC, and build iOS apps that way.

  • one can develop ios apps on apple tv which has ios operating system?

    1. Reinder de Vries February 26, 2018 17:48 in reply to Vigorous

      Hmm, I doubt that. Apple TVs run tvOS and you can build tvOS apps with... Xcode! What kind of approach did you find?

  • Jiří Sedláček February 19, 2018 13:34

    I am very sorry to mention that, but 80386 were usually created with 16, 20, 25 MHz and the fastest 80386 was 40 MHz the 100 MHz was available for 80486. The AGC on Apollo 11 had approximately 64Kbyte of memory and operated at 0.043MHz.

    1. Reinder de Vries February 19, 2018 14:01 in reply to Jiří

      Awesome! Thanks for your comment. I'm sure I had a 386 and then a 486, so that 386 must have been slower then. A couple KHz off is a rounding error these days, but I imagine that back in those days a couple more instructions made all the difference.

      I came across the AGC source code a while back – maybe it's of interest to you. https://github.com/chrislgarry/Apollo-11
      And I once found this link to a document explaining the programming guidelines for previous-century spaceflight, but I can't find it anymore :-( It said something like: no branching, no procedures, no multi-threading.

      Cheers!

  • Great article. One question is that I currently have produced an app on Xamarin for UWP and Android. Xamarin also create the iOS version but it needs a Mac to compile it. Most recommendations for what Mac to get have been a little OTT so was encouraged by your being able to compile on the 2013 MacBook Air. How much storage memory does it have? Most of the low end ones only have 128 GB. BTW, I'm considering one over a Mini as it will take up less space in my environment.

    1. Reinder de Vries February 3, 2018 21:49 in reply to Bhairitu

      Thanks! My MBA has 8 GB RAM memory and 256 GB hard disk space. Keep in mind that hard disk space has little to do with Xcode compilation time.

  • Is it possible to have iOS run with QEMU? Do we have iOS image to be used with QEMU and is that legal?

    1. Reinder de Vries January 25, 2018 10:35 in reply to Gnr

      Not that I know of. There appears to have been an iEmu and QEMU-iOS project, but those have gone abandoned. QEMU is an emulator, so it would emulate an ARM processor instruction set. That's often slow, but the biggest problem would be supporting and emulating the iPhone hardware. Running iOS or macOS on non-Apple hardware is against Apple's EULA. Your best bet would be to use a virtual macOS instance and run iPhone Simulator from there. If you need access to iOS apps, try to get a second-hand or refurbished iPhone. Good luck!

  • Stefan Fuglsang January 21, 2018 09:25

    I stumbled on this blog trying to find out how to use Windows to make IOS apps. It's clear an well written, allthough the message is a bit disappointing

    There is, however, one way to run program on IOS, without the need for a Mac: use the Pythonista app to run Python programs. Not all modules are available but you can make quite powerfull programs, including 2d games.

    1. Reinder de Vries January 21, 2018 12:12 in reply to Stefan

      Awesome! Great idea. Thanks for sharing! You can find Pythonista here: http://omz-software.com/pythonista/

      You're right, it's disappointing that you can't code iOS app on Windows. For iOS apps you need Xcode, and Xcode runs on Mac – that's the message. I think, however, if you're serious about publishing apps as an independent developer or for your work, and you're getting results, it becomes easier to justify investing in a Mac. And there's always Android development, of course!

      1. Stefan Fuglsang January 21, 2018 12:32 in reply to Reinder

        I forgot to mention that there's also Javascript Anywhere and Processing.org

        1. Reinder de Vries January 21, 2018 13:30 in reply to Stefan

          Great! You can't use these tools to actually publish an app though, right? They are effectively runtimes – you'd still need to use Xcode to create an app binary, and publish that in the App Store.

          1. Stefan Fuglsang January 21, 2018 14:27 in reply to Reinder

            You're right, you cannot make a standalone app - you would need to distribute the source code to users with the same interpreter app installed instead. So it's mostly useful for education, and for programs for your own personal use.

  • Enes Çelik July 14, 2017 21:45

    awsome! Can I translate this on my blog?