適用於 Windows 的遠端 iOS 模擬器Remoted iOS Simulator for Windows

遠端 iOS 模擬器的 Windows 可讓您測試您的應用程式,在 iOS 模擬器與 Visual Studio 2017 的 Windows 中顯示。The Remoted iOS Simulator for Windows allows you to test your apps on an iOS simulator displayed in Windows alongside Visual Studio 2017.

使用者入門Getting started

遠端 iOS 模擬器的 Windows 會自動安裝 Visual Studio 2017 中的 Xamarin 的一部分。The Remoted iOS Simulator for Windows is installed automatically as part of Xamarin in Visual Studio 2017. 若要使用它,請遵循下列步驟:To use it, follow these steps:

  1. 至 Mac 組建主機配對 Visual studio 2017Pair Visual 2017 to a Mac Build host.
  2. 在 Visual Studio 2017 中,開始偵錯 iOS 或 tvOS 專案。In Visual Studio 2017, start debugging an iOS or tvOS project. 遠端 iOS 模擬器的 Windows 會出現在 Windows 電腦上。The Remoted iOS Simulator for Windows will appear on your Windows machine.

監看式這段影片的逐步指南。Watch this video for a step-by-step guide.

模擬器視窗Simulator window

在模擬器 視窗頂端工具列會包含數個實用的按鈕:The toolbar at the top of the simulator's window contains a number of useful buttons:

  • 家用– 模擬 iOS 裝置上的 [首頁] 按鈕。Home – Simulates the home button on an iOS device.

  • 鎖定– 鎖定模擬器 (撥動以解除鎖定)。Lock – Locks the simulator (swipe to unlock).

  • 螢幕擷取畫面– 儲存模擬器的螢幕擷取畫面 (儲存在Pictures\Xamarin\iOS 模擬器\)。Screenshot – Saves a screenshot of the simulator (stored in Pictures\Xamarin\iOS Simulator\).

  • 設定 – 顯示鍵盤、 位置和其他設定。Settings – Displays keyboard, location, and other settings.

  • 其他選項 -會顯示各種模擬器選項,例如旋轉、 搖晃手勢和 Touch id。Other options – Brings up various simulator options such as rotation, shake gestures, and Touch ID.

設定Settings

按一下工具列的齒輪圖示開啟設定視窗:Clicking the toolbar's gear icon opens the Settings window:

這些設定可讓您啟用硬體鍵盤,請選擇 裝置應該的位置 (靜態和移動位置同時支援) 的報表,啟用 Touch ID,以及重設的內容和設定模擬器。These settings allow you to enable the hardware keyboard, choose a location that the device should report (static and moving locations are both supported), enable Touch ID, and reset the content and settings for the simulator.

其他選項Other options

工具列的省略符號按鈕會顯示其他選項,例如旋轉、 搖晃手勢和 重新啟動。The toolbar's ellipsis button reveals other options such as rotation, shake gestures, and rebooting. 這些相同的選項可視為清單,用滑鼠右鍵按一下模擬器 視窗中的任何位置:These same options can be viewed as a list by right-clicking anywhere in the simulator's window:

觸控式螢幕支援Touchscreen support

現今大部分的 Windows 電腦有觸控式螢幕。Most modern Windows computers have touch screens. 由於遠端 iOS 模擬器的 Windows 支援觸控互動,您可以測試您的應用程式使用相同的捏合、 撥動和您使用實體 iOS 裝置的多指觸控手勢。Since the Remoted iOS Simulator for Windows supports touch interactions, you can test your app with the same pinch, swipe, and multi-finger touch gestures that you use with physical iOS devices.

同樣地,遠端 iOS 模擬器的 Windows 會將 Windows 手寫筆輸入視為 Apple 鉛筆輸入。Similarly, the Remoted iOS Simulator for Windows treats Windows Stylus input as Apple Pencil input.

停用遠端 iOS 模擬器的 WindowsDisabling the Remoted iOS Simulator for Windows

若要停用遠端 iOS 模擬器的 Windows,請瀏覽至工具 > 選項 > Xamarin > iOS 設定並取消核取遠端 Simulator 到 WindowsTo disable the Remoted iOS Simulator for Windows, navigate to Tools > Options > Xamarin > iOS Settings and uncheck Remote Simulator to Windows.

停用這個選項,偵錯會開啟已連線的 Mac 上的 iOS 模擬器組建主機。With this option disabled, debugging opens the iOS Simulator on the connected Mac build host.