在 Windows 上安裝 Xamarin.iOSInstalling Xamarin.iOS on Windows

本文說明如何設定 Windows 電腦和 Mac 組建主機來進行 Xamarin.iOS 開發。This article describes how to set up a Windows machine and a Mac build host for Xamarin.iOS development.

總覽Overview

若要在 Windows 上使用 Visual Studio 2019 建置 Xamarin.iOS 應用程式,您需要:To build Xamarin.iOS apps with Visual Studio 2019 on Windows, you will need:

  • 已安裝 Visual Studio 2019 的 Windows 電腦。A Windows machine with Visual Studio 2019 installed. 這可以是實體或虛擬機器。This can be a physical or a virtual machine.

  • 已設定 Apple 組建工具和 Xamarin.iOS 的網路可存取 Mac。A network-accessible Mac set up with Apple's build tools and Xamarin.iOS. Visual Studio 2019 透過網路連線存取這部電腦,以使用編譯原生 iOS 應用程式所需的 Apple 建置工具。Visual Studio 2019 accesses this machine over a network connection to use Apple's build tools, which are required for compiling native iOS applications.

    提示

    無法取得 Mac 嗎?Don't have access to a Mac?

    若您無法取得 Mac,可以使用 MacinCloudMacStadium;這兩個服務都提供雲端式 Mac 硬體,可用來建置 Xamarin.iOS 專案。If you do not have access to a Mac, you can use MacinCloud or MacStadium; both services provide cloud-based Mac hardware that you can use to build Xamarin.iOS projects.

安裝程式Setup

若要在 Visual Studio 2019 中開始設定 Xamarin.iOS 開發,請遵循下列步驟:To get set up for Xamarin.iOS development in Visual Studio 2019, follow these steps:

  1. 設定 Windows (安裝 Visual Studio 2019)Set up Windows (Install Visual Studio 2019)

    Xamarin.iOS 會在獨立或虛擬機器上使用 Visual Studio 2019 Community、Professional 和 Enterprise 版本。Xamarin.iOS works with Visual Studio 2019 Community, Professional, and Enterprise editions, on a standalone or virtual machine.

  2. 設定 Mac (安裝 Xcode 和 Visual Studio for Mac)Set up Mac (Install Xcode and Visual Studio for Mac)

    若要建置、偵錯和簽署 iOS 應用程式進行散發,Visual Studio 2017 必須透過網路存取已設定 Apple 開發人員工具 (Xcode) 和 Xamarin.iOS 的 Mac 組建主機。To build, debug, and sign iOS applications for distribution, Visual Studio 2017 must have network access to a Mac build host configured with both Apple's developer tools (Xcode) and Xamarin.iOS.

    注意

    如果您不想要安裝 Visual Studio for Mac,則 Visual Studio 2019 可以自動設定具有建置 Xamarin.iOS 應用程式所需軟體的 Mac 組建主機。If you would prefer not to install Visual Studio for Mac, Visual Studio 2019 can automatically configure, the Mac build host with the software necessary to build Xamarin.iOS applications. 如需詳細資訊,請參閱自動 Mac 佈建For more information, see Automatic Mac provisioning.

  3. 與 Mac 配對 (將 Visual Studio 2019 連線至 Mac)Pair to Mac (Connect Visual Studio 2019 to the Mac)

    若要讓 Visual Studio 2019 在 Mac 上使用 iOS 建置工具,則兩部電腦必須透過網路連線。For Visual Studio 2019 to use the iOS build tools on the Mac, the two machines must connect over a network.

總覽Overview

若要在 Windows 上使用 Visual Studio 2017 建置 Xamarin.iOS 應用程式,則您需要:To build Xamarin.iOS apps with Visual Studio 2017 on Windows, you will need:

  • 已安裝 Visual Studio 2017 的 Windows 電腦。A Windows machine with Visual Studio 2017 installed. 這可以是實體或虛擬機器。This can be a physical or a virtual machine.

  • 已設定 Apple 組建工具和 Xamarin.iOS 的網路可存取 Mac。A network-accessible Mac set up with Apple's build tools and Xamarin.iOS. Visual Studio 2017 透過網路連線存取這部電腦,以使用用於編譯原生 iOS 應用程式所需的 Apple 組建工具。Visual Studio 2017 accesses this machine over a network connection to use Apple's build tools, which are required for compiling native iOS applications.

安裝程式Setup

若要在 Visual Studio 2017 中設定進行 Xamarin.iOS 開發,請遵循下列步驟:To get set up for Xamarin.iOS development in Visual Studio 2017, follow these steps:

  1. 設定 Windows (安裝 Visual Studio 2017)Set up Windows (Install Visual Studio 2017)

    Xamarin.iOS 會在獨立或虛擬機器上使用 Visual Studio 2017 Community、Professional 和 Enterprise Edition。Xamarin.iOS works with Visual Studio 2017 Community, Professional, and Enterprise editions, on a standalone or virtual machine.

  2. 設定 Mac (安裝 Xcode 和 Visual Studio for Mac)Set up Mac (Install Xcode and Visual Studio for Mac)

    若要建置、偵錯和簽署 iOS 應用程式進行散發,Visual Studio 2017 必須透過網路存取已設定 Apple 開發人員工具 (Xcode) 和 Xamarin.iOS 的 Mac 組建主機。To build, debug, and sign iOS applications for distribution, Visual Studio 2017 must have network access to a Mac build host configured with both Apple's developer tools (Xcode) and Xamarin.iOS.

    注意

    如果您偏好不要安裝 Visual Studio for Mac,則從 Visual Studio 2017 15.6 版開始,Visual Studio 2017 可以自動設定具有建置 Xamarin.iOS 應用程式所需軟體的 Mac 組建主機。If you would prefer not to install Visual Studio for Mac, starting with Visual Studio 2017 version 15.6, Visual Studio 2017 can automatically configure the Mac build host with the software necessary to build Xamarin.iOS applications. 如需詳細資訊,請參閱自動 Mac 佈建For more information, see Automatic Mac provisioning.

  3. 與 Mac 配對 (將 Visual Studio 2017 連線至 Mac)Pair to Mac (Connect Visual Studio 2017 to the Mac)

    若要讓 Visual Studio 2017 在 Mac 上使用 iOS 組建工具,兩部電腦必須透過網路連線。For Visual Studio 2017 to use the iOS build tools on the Mac, the two machines must connect over a network.

總結Summary

本文說明如何設定 Windows 電腦和其相關聯 Mac 組建主機來進行 Xamarin.iOS 開發。This article described how to set up a Windows machine and its associated Mac build host for Xamarin.iOS development.

後續步驟Next steps