Is programming for iOS on a virtual machine feasible?

Asked

Viewed 7,541 times

10

I am Android developer, but now I will start developing also for IOS.

Is it functional to program for iOS on a virtual machine? Or do I have to buy a Mac anyway?

  • 1

    If by virtual machine you are referring to a complete virtualization, like Virtualbox, I strongly recommend that you abandon this idea. In my experience, the performance is painful. Compiling in the Xcode should turn into a nightmare. If you have any access to a Mac running Esxi and refer to a virtual (guest) instance of macOS running inside the hypervisor, the conversation is quite different.

  • 1

    Unless you have several free hours and enough willingness to learn something new; know a little about kernel, SSDT, DSDT (ACPI), EFI, like to play with hardware and also be willing to hunt very specific parts on Mercadolivre or eBay, nor consider the possibility of Hackintosh. At least not for something serious and critical like work.

  • As far as I can tell, there’s a lot of controversy about whether it’s possible or not, or whether it’s viable or not to work with a VM or hack. I need something that won’t let me down, because it’s too risky to spend money on new equipment and not get the expected result... For now I think the best solution is to buy a Mac even :/

  • 1

    Personally, I also recommend you buy a Mac. If price is a problem, I suggest a MBP 13/15" Early/Late 2013. You find for relatively attractive values in advertisements of used like OLX and they still last for a while. Except for the video card, you will probably find a MBP with specs very similar to what you described. As for Windows, you can always run your Windows on Bootcamp or, if you own a Mac, legally run macOS in a hypervisor without much loss of performance.

  • 1

    There is no controversy, objective information is set. Opinions can always be given and seem to create a controversy, but just follow what you really know. If it will be good for you, just testing. No random person on the Internet can say what’s good in your case.

  • I’ve done this but with the virtual machine (Vmware) in note separate from the development (core i7 8gb ram). It worked well and gave to debug quiet.

  • @Rafaelsilva thinks it needs complements in the answers, or is already good?

Show 2 more comments

5 answers

15


Technically, I might be able to, but the license doesn’t allow me to do that. You can only run an iOS simulator and generate the app from an Apple machine. You can even use a VM, but it has to be running on a Mac.

You can use a service that provides you with a VM running on Mac. Visual Studio Enterprise provides something, has other Mac cloud services. See:

You’ll have a better experience with your own Mac. If it pays off only you can say.

  • 1

    In fact, the biggest impediment to developing on Apple platforms without an approved hardware is licensing. It’s simply not possible to run macOS on generic hardware within the licence model offered by the company. The only legal alternatives are Iaas de Macs or buying your own hardware. There is no technical impossibility to run an Apple operating system, as long as you keep in mind the challenges and possible limitations, although it is also not easy or does that mean that will work in all cases.

  • 1

    I already ran a test of running Macos on VM on Windows, just did not continue because of the license.

  • Yeah, the license is the biggest Blocker in this case. And when I mentioned generic hardware, I meant using macOS on Bare metal, that is to say, Hackintosh.

8

So much in Vms, Machine Cloud (Mac cloud services) or solutions Hackintosh Xcode can work yes.

However, what should be taken into consideration is your ultimate goal. It would only be for learning or intends to publish your apps?

Why is this important? For example, to publish your apps to the App Store one of the procedures is generate a certificate security straight from your Mac. If it’s not original you will not be able to perform this procedure.

Remember that all these alternatives violate the "Terms of Use" Apple. The contract mentions that we don’t buy the software, we just "license it". And the license terms don’t allow us to install the software on a non-Apple machine.

inserir a descrição da imagem aqui

  • Two observations that can improve the quality of your answer: 1) Always try to use text when possible, linking the source and performing a free translation of the snippet of interest. 2) Describe even if briefly the alternatives of the article link you quoted, so the answer is not disabled if the link becomes unavailable

  • 1

    Reprinted answer.

  • Do clouds also violate? I sincerely intend to buy a Mac, but the timing is not ideal, so I have to manage with what I can :)

  • Some Machine Cloud service providers even mention on their terms that they make partitions and use Bare metal (Hackintosh).

  • @Andreialopes I’m curious now about Ionic’s PRO service, which promise "cloud" as well. Not that I always use Ionic, but for the specific case I’ll take a look. Unfortunately it is investing high in almost all scenarios to be able to develop, I really wanted a dev environment for iOS on Linux (or even windows) official apple :/, but we will only be in dream PS: to reply to a specific person who has posted or edited your post use the @<username>

3

I used Virtualbox to test how it is to program in Swift, it took me a long time to get MAC OS X to run, at the time I think it was the Yosemite or El Capitan that I installed.

After installing I took a long time to be able to install the Xcode too, and when I finally got it, it worked very well, without many locks etc.

My biggest problem was with screen size in virtualbox, I could not leave the full screen and had to use scroll bar, besides some MAC commands that I could not find on my keyboard "standard" were also a problem for me.

In short

It is possible to program in Swift using virtualbox yes. But it is a far from pleasant experience. Regarding the deployment of the application, I can not say for sure but it is likely that you can not do using VM.

My suggestion is to buy a MAC used by olx, mercadolivre etc... and use it to get money to buy a new one with a better configuration.

1

If you just create a VM and within it use a development application, it will work normally but possibly duplicity error may occur if depending on the development platform you choose you have to generate another emulator to work...

0

Yes, you can even publish the application. I have one observation, only: It’s usually a huge wave to make the Mac recognize your video card. With this, everything is a little slow. So what I would recommend would be to develop in Xamarin/React Enable and at the time q want to deploy to iOS, play the code on the virtual machine (by "git pull" or something like that) and compile there.

I have read that you can virtualize and be able to use the video card, but I haven’t tested it yet, I will test it in a few days. It is using "macOS-simple-kvm". Gives a Google in this q he promises to share well all the features with the virtual machine, including video card.

The other idea would be to do a hackintosh q will also work, but for this case your hardware has to be compatible (Intel processor + AMD graphics card)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.