Can Xamarin not be used without a Mac?

前端 未结 2 707
有刺的猬
有刺的猬 2021-01-27 06:45

I\'m using Visual Studio 2017 on Windows 10 with no Mac at all. When I try to debug a new Xamarin cross platform project, VS tries to locate a Mac.

Is a Mac pretty much

相关标签:
2条回答
  • 2021-01-27 07:21

    Xamarin requires access to a networked Mac to build and debug iOS applications. There is no way to perform a build for a native iOS app without a physical Mac, as Apple only makes the iOS SDK available for macOS.

    From the Xamarin.iOS developer docs:

    "iOS applications cannot be created without Apple’s compiler,
    and they cannot be deployed without Apple’s certificates and
    code-signing tools. This means that a Xamarin.iOS for Visual Studio
    installation requires a connection to a networked Mac OS X computer
    in order to perform these tasks."
    

    https://developer.xamarin.com/guides/ios/getting_started/installation/windows/#Requirements

    Your best bet would probably be a Mac Mini. You can find them used online to save a little money, or if you'd prefer not to buy used they sometimes show up on Apple's refurbished site: https://www.apple.com/shop/browse/home/specialdeals/mac

    Another option might be to use a cloud option, but I'm not sure how the latency would affect Visual Studio when trying to build and it would likely make debugging difficult. I've never used one of these services, but here are two that I've heard of in the past: http://www.macincloud.com/ and http://www.xcodeclub.com/

    Please also note that it is both unsupported and in violation of Apple's license agreements to attempt running a macOS VM on non-Apple hardware, even though it is technically possible.

    0 讨论(0)
  • 2021-01-27 07:38

    Yes you will need a Mac. It's not so much a limitation on Xamarin as it is a restriction by Apple to make people buy their hardware.

    Regardless of if you are looking to tinker, ship an app or set up a build pipeline, your best option is something like MacinCloud or a Mac Mini (i.e. something on your local network).

    UPDATE: During the Build 2017 conference, Xamarin Live Player was announced!

    0 讨论(0)
提交回复
热议问题