ios 在 Mac 上开发与在基于 Windows 的 PC 上使用虚拟机?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4218321/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 18:07:16  来源:igfitidea点击:

Developing on Mac vs. using virtual machine on windows based PC?

xcodemacosipadiosvirtual-machine

提问by A Salcedo

I am trying to set up a project to develop an iPad application for the company I develop for. I am relatively new to iOS development and just recently got a not too old, not too new either iMac. My problem is that it is not intel-based and therefore I can't install the latest SDK on it. Not to mention that the new Xcode requires intel-based processors too. I have been doing some digging and found the possibility of running OSX and its applications through a virtual machine. Everywhere I have been searching for alternate options, this is the only other I can find. My question is: is it better or more recommended to develop iOS applications using a Mac vs using a virtual machine? If so, what makes it better to develop on one as opposed to the other option? Personally I am about to just tell my boss to get a couple of intel-based macs, but I need to back my suggestion up.

我正在尝试建立一个项目来为我为其开发的公司开发 iPad 应用程序。我对 iOS 开发比较陌生,最近刚买了一台不太旧也不太新的 iMac。我的问题是它不是基于英特尔的,因此我无法在其上安装最新的 SDK。更不用说新的 Xcode 也需要基于英特尔的处理器。我一直在做一些挖掘,发现了通过虚拟机运行 OSX 及其应用程序的可能性。我到处寻找替代选项,这是我唯一能找到的其他选项。我的问题是:使用 Mac 与使用虚拟机开发 iOS 应用程序是更好还是更推荐?如果是这样,与另一种选择相比,什么使开发更好?就我个人而言,我正要告诉我的老板买几台基于英特尔的 mac,

回答by Kristopher Johnson

It will be a lot easier to just go ahead and get some Macs. You might be able to get some sorta Hackintosh thing sorta working on a VM, but the hours you and your colleagues spend getting all that stuff to work and supporting it will probably cost more than just buying a couple of Mac Minis or MacBooks.

继续购买一些 Mac 会容易得多。您可能能够在 VM 上获得某种类似于 Hackintosh 的东西,但是您和您的同事花在让所有这些东西工作和支持它上的时间可能比购买几台 Mac Minis 或 MacBooks 花费更多。

Also, installing Mac OS X on a VM on non-Apple hardware is forbidden by Apple's licensing terms. Does your boss want you to violate copyright laws? If so, would your boss's bosses concur?

此外,Apple 的许可条款禁止在非 Apple 硬件上的 VM 上安装 Mac OS X。你的老板想让你违反版权法吗?如果是这样,你老板的老板会同意吗?

回答by TechZen

The developer tools run fairly close to the hardware so I don't think you would have good success running under VM. I don't know of anyone who has done so. Running MacOS on VM is more of a hacker's stunt than practical solution for the vast majority of cases. I would say that is doubly true for development.

开发人员工具运行得非常接近硬件,所以我认为在 VM 下运行不会取得很好的成功。我不知道有谁这样做过。在虚拟机上运行的MacOS是更多黑客的特技比绝大多数情况下的实用解决方案。我会说这对发展来说是双重的。

More importantly, its not very cost effective. You can get a second hand Mac mini for $300 and plug it in to your existing monitor and keyboard. Given that even a small company pays out $50-$100+ an hour total cost for a programmer, half a day wasted futzing with a VM would eat any savings you might get.

更重要的是,它不是很划算。您可以花 300 美元购买一台二手 Mac mini,并将其插入现有的显示器和键盘。鉴于即使是小公司也要为程序员支付 50 到 100 美元以上的总成本,那么浪费在虚拟机上的半天时间会耗尽您可能获得的任何节省。

It's better to just get the right gear and get work. I've been doing this a long time and hacked solutions always end up costing more time and money than they save. If you just don't have the money up front, you may not have the choice but if you have the money, it's well spent up front to avoid random stoppages and bugs down the road.

最好是获得合适的装备并开始工作。我已经这样做了很长时间,被黑客入侵的解决方案最终会花费更多的时间和金钱,而不是节省下来的。如果您只是没有预付的钱,您可能别无选择,但是如果您有钱,那么预付是值得的,以避免在路上发生随机停工和错误。

回答by Bachi

In some cases, http://virtualmacosx.com/might be a solution. They offer a xcode virtual mac in the cloud. You access it by vnc, so it won't be very fast, unless you have a very low network latency to their servers.

在某些情况下,http://virtualmacosx.com/可能是一个解决方案。他们在云中提供了一个 xcode 虚拟 mac。您通过 vnc 访问它,因此它不会很快,除非您的服务器网络延迟非常低。

回答by Jeff Kelley

You can get a Mac Mini on eBayfor under $500. Snow Leopard is $29. There are almost no circumstances where it wouldn't be worth spending the money to get a legitimate, legal Mac to develop on.

您可以在 eBay 上以低于 500 美元的价格购买Mac Mini 。雪豹售价 29 美元。几乎在任何情况下,花钱购买合法的 Mac 都是不值得的。

回答by CSharpRocks

I'm pretty sure that you can't legally run a Mac OS on a non Mac machine.

我很确定你不能在非 Mac 机器上合法地运行 Mac 操作系统。