I do not endorse or approve pirating of any kind. Please make sure you own a legitimate copy of OS X.
Let me preface my hate for Apple before I start. I actually used to be somewhat of an Apple fan boy with my lavishing new iPhone, iPad and a ton of apps. That was until I got a new Windows Phone 8 and also decided to start developing for the mobile platform. I love my Windows Phone and will never buy another iPhone and I also love my Microsoft Surface Pro and will never buy another iAnything.(at least willingly) I do realize iPad can be a great device for those people who like to surf the internet, check email and play with basic apps. In the corporate world though as a developer it is useless to me. My Surface is so much more as I can pretty much do anything on it that I can on my desktop or laptop.
Besides all of that the biggest reason for my hate is that Apple makes it real difficult to develop for IOS if you don’t have a MAC. They do not provide a Windows version of their toolset Xcode that is used to develop IOS apps. While Microsoft doesn’t have an exclusive native SDK for MAC to develop for Windows Phone they do have several walk through documents on how to install and setup a development environment in MAC OS like this one. Ok, I am done with my rant and can get on with the article.
The whole point of this article is to describe what it took for me to setup a MAC OS X development environment on my Windows 8.1 computer so I can develop IOS applications. More of a note to self since I will have to do this in the future and can never remember how I did it.
What is needed?
- A computer that supports virtualization.
- Virtualbox from Oracle. https://www.virtualbox.org/
- MAC OS X 10.8X Mountain Lion ISO that has a boot loader included. You can search for this or go to this site. http://leohazard.com/ NOTE:Please make sure you have a legitimate copy of this software.
Ok, finally, here we go.
- Install Virtualbox. Nothing fancy here just do all defaults.
- Start Virtualbox and click New.
- In the name type MAC OS X Mountain Lion or whatever you want and make sure the Type is MAC OS X and the Version is Mac OS X 10.8 Mountain Lion (64 bit). Click Next.
- Memory can be left at 2048 but if you have more to spare you can increase it. There has been issues sometimes if more than 4096 is selected. Click Next.
- Make sure Create a virtual hard drive now is selected and click Create.
- VDI is the default which is fine, click Next.
- Choose Dynamic or Fixed then click Next.
- Hard drive size is up to you but do not go below the default 20GB. I selected 35GB. Click Create.
- Select your new VM that you just created and click Settings.
- You will see all of the different options on the left side. General is fine. System is our first place we need to make changes. Click System. Uncheck Floppy, uncheck Enable EFI.
- Click the Display tab. Increase the Video Memory as high as it will go which should be 128MB. Check Enable 3D Acceleration.
- Click the Storage tab. Delete the SATA controller and VDI in the list. Create an IDE Controller. Add the VDI you had created during the new VM wizard or you could also create a new one. Add the MAC OS X 10.8X Mountain Lion ISO as a CD/DVD Device. Also make sure the Type is ICH6.
- Click Ok to close the settings window.
- Start the VM. You might need to press F8 to enter the boot loader or boot from the CD. If all has been setup correctly you should come up to installation screen.
- Go to Disk Utilities. Choose the hard disk click the Erase tab. Make sure the format is OS X Extended (Journaled) and set a name like OSX. Click Erase.
- Close Disk Utilities.
- Continue the installation but make sure to click Customize on the bottom left when that screen comes up.
- In the customize screen the most important thing to check is one of the boot loaders. Look through the other options and check what you think you might need.
- Continue the install. It will give you an estimate while installing and can be anywhere from 10-30 minutes.
- You will get an Install Succeeded message and a restart button. Click Restart.
- It most likely will not actually restart and hang after a shutdown message. Manually close/shutdown the VM.
- Before you start the VM back up make sure to go into settings and remove the CD/DVD from your IDE controller.
- Start the VM and it should boot into MAC OS X Mountain Lion. If it keeps coming up to a message like boot kernel, hit F8 then type -f to ignore those messages and continue to boot.
- You should be greeted with the MAC OS X preparation screen. Once you are into the OS I suggest shutting down and taking a snapshot.
- You now have a MAC OS X virtual machine that you can install Xcode on and develop IOS applications. I will most likely write a post on Xcode also.