Want to develop applications for iOS on Windows? Don’t have a Mac at your disposal? If you don’t know where to start, we’ll tell you what you need for iOS development on Windows 10 and how to easily connect your iPhone or iPad to a guest macOS running on a Windows PC.
Table of contents:
- How to develop iPhone apps on Windows
- What is Xcode and why do you need it?
- Running Xcode on macOS in VirtualBox
- Dedicated software for linking VirtualBox with an iPhone/iPad
- How to connect iOS devices to VirtualBox. Step-by-step guide
- Top 5 alternative solutions for iOS development on Windows
How to develop iPhone apps on Windows
When you have an intention to write iOS apps on Windows, you should remember that the only platform that is compatible with the iOS SDK is macOS. This means the main developer tool for macOS, Xcode, can be used only with this operating system.
Below you’ll find a brief tutorial on how to make XCode work on Windows. To achieve your goal, you will need a Windows computer, a copy of macOS, an Apple ID, a dedicated software tool for redirecting iOS devices to a virtual environment (e.g. USB Network Gate), and a stable connection to the Internet.
What is Xcode and why do you need it?
As is mentioned before, the major software tool that can help you build an iOS app is Xcode, an integrated development environment (IDE) for macOS. It allows creating applications not only for iPhone and iPad but also for Mac, Apple TV, and Apple Watch. Among other things, Xcode offers an interface builder, a code editor, an asset management toolkit, and simulators of iOS devices. It gives you the ability to test the application that you are developing with no need to leave Xcode.
Xcode provides graphical tools for analyzing application performance, including those for diagnosing CPU usage and utilization of drives (HDD, SDD) and more.
Running Xcode on macOS in VirtualBox
Choosing between the two, most users opt for VirtualBox, as it is free and open-source, whereas VMware Workstation is proprietary software.
So, let's imagine that you decided to use VirtualBox. What you should do next is make sure that the Windows computer on which you are going to install it is:
- A relatively powerful PC capable of operating smoothly with a virtual machine installed;
- Its hardware is equivalent to that of MacBook, Mac Pro, or iMac;
- It has a Dual-Core Intel processor and no less than 2GB of RAM.
When you are ready, install VirtualBox on your PC.
After the installation procedure is complete, start the app and select to install Mac OS X Server (x64). Allocate at least 2GB of RAM (4GB+ is recommended) and 30GB+ of hard disk space to your VM.
VirtualBox will make all required OS configurations automatically. You should only go to the Settings menu and change the following:
- Leave unchecked the “Enable EFI” box in the System tab;
- Choose two CPUs in the Processor tab;
- Increase the video memory above 128MB in the Display tab.
Then, install macOS and boot your VM
It’s important to remember: when configuring macOS, you should enter a valid Apple ID. This Apple account will be needed for Xcode download later.
At the final stage of macOS configurations, select the desired resolution and settings in the System Preferences. Once done, installing XCode is simple:
- In the Dock, find the App Store application icon and click it. Once the app has started, type Xcode in the search field located at the top-right corner.
- Now, click the Install button below the Xcode icon.
- Once Xcode is downloaded and installed, you can run it on your guest OS just like it was Xcode for Windows!
Note: There might be a need to provide your Apple ID (if you didn’t enter it when configuring the macOS virtual machine) or re-enter it (if you did so).
Dedicated software for linking VirtualBox with an iPhone/iPad
Now that you know how to get a Mac on VirtualBox, we’ll tell you about another challenge you may face. The issue that is common for many virtualization apps is the inability to connect to USB devices attached to the host computer. Although some VMs offer USB passthrough functionality, the problem still persists when it comes to particular USB device types.
If your VirtualBox app does not recognize an iPhone that you want to use for app testing, you can resort to the help of a dedicated software tool called USB Network Gate.
USB Network Gate is a simple yet powerful software application designed to forward USB devices to a virtual environment. It allows redirecting any iOS device to VirtualBox, VMware, Hyper-V, XenDesktop, and many other virtualization programs.
With this solution, you will be able to connect your iPhone or iPad to a macOS virtual machine and make the device visible to Xcode and all other apps running on your Mac.
A big advantage of this software is that it works not only with virtual machines but also with cloud infrastructures. If you decide to rent a Mac in the Cloud, you will have no problem redirecting iOS devices from your Windows PC to the cloud desktop.
In order to share an iOS device (e.g. an iPhone) with a guest operating system you use on your Windows PC, do as follows:
- Connect the iPhone to your host PC physically.
- Download USB Network Gate and install it.
- In the software interface, share the iPhone by clicking the Share button next to the iPhone’s name in the Local USB devices tab.
- Install the app on the guest OS.
- Connect the iPhone by clicking the Connect button in the Remote devices tab.
That's it! Now you can work with the iPhone like it was physically attached to your Mac.
As you see, USB Network Gate is a cross-platform solution. Additionally to Windows and Mac, it supports Linux and Android platforms. That means you can share USB devices among these OSes no matter which of them is used as a host and which one is a guest.
Top 5 Xcode alternatives for iOS development on Windows
- Building your own “Hackintosh” - a PC that is customized to run macOS. If you are a tech-savvy Mac supporter, you can create a separate physical computer running macOS. You can find all the necessary information on how to run Mac OS X on an unsupported computer at Hackintosh.com.
- Xamarin is an open-source mobile app platform that gives you a way to develop cross-platform apps that can be deployed natively to iOS using C#.