Thursday , October 17 2024

MAC OS X, Xcode and Virtualbox

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.

  1. Install Virtualbox.  Nothing fancy here just do all defaults.
  2. Start Virtualbox and click New.
  3. 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).newVB Click Next.
  4. 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.
  5. Make sure Create a virtual hard drive now is selected and click Create.
  6. VDI is the default which is fine, click Next.
  7. Choose Dynamic or Fixed then click Next.
  8. Hard drive size is up to you but do not go below the default 20GB.  I selected 35GB.  Click Create.
  9. Select your new VM that you just created and click Settings.
  10. 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.
  11. Click the Display tab.  Increase the Video Memory as high as it will go which should be 128MB.  Check Enable 3D Acceleration.
  12. 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.
  13. storageVB
  14. Click Ok to close the settings window.
  15. 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.
  16. 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.
  17. Close Disk Utilities.
  18. Continue the installation but make sure to click Customize on the bottom left when that screen comes up.
  19. 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.
  20. Continue the install.  It will give you an estimate while installing and can be anywhere from 10-30 minutes.
  21. You will get an Install Succeeded message and a restart button.  Click Restart.
  22. It most likely will not actually restart and hang after a shutdown message.  Manually close/shutdown the VM.
  23. Before you start the VM back up make sure to go into settings and remove the CD/DVD from your IDE controller.
  24. 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.
  25. 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.
  26. 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.

 

About scott

Leave a Reply

Your email address will not be published. Required fields are marked *