Visual Studio 如何选择启动哪个 iOS 模拟器?
How does Visual Studio choose which iOS simulator to start?
我安装了 Xcode 8.3.3,并且 Visual Studio 使用它进行编译和模拟。
我安装了 Xcode 9.0.1,想在 iPhone X 上测试应用程序以确保没有任何显示问题。
不想用Xcode9.0.1编译,只想用模拟器
我在 Visual Studio 中看不到 Mac 我选择模拟器 运行 的地方。如何配置 Visual Studio 以启动特定的模拟器?
Xamarin 直接调用 Xcode9 中的 SimulatorKit.framework
vs Xcode8 中的 CoreSimulator.framework
,以便在每个受尊重的 Xcode 中启动 Simulator.app
捆绑并调用它。
所以基本上你所问的在 VS4M IDE 中是不可能的,但是从 cmd 行它使用 Xcode 工具。
您可以使用 simctl
(通过 xcrun
)到 运行 特定的 sim 设备,并在其中安装 app
包。
获取所有支持的 sims 列表(您需要设备 ID (GUID):
xcrun simctl list
启动模拟卡:
xcrun simctl boot BDC5B693-9957-4034-BEFD-D3545F875DF6
显示启动的 sim:
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
在启动的 sim 卡中安装应用程序包:
xcrun simctl install booted /user/sushi/code/gitlab/iPadProGenomeDNADashboard/iOS/bin/iPhoneSimulator/Debug/device-builds/GenomeDNADashboard.app
这样做可以让您将 VS4M/Xcode8-based 应用程序包安装到基于 iPhone 8/8s/X/... Xcode9 的模拟器中并测试 UI.你当然不能这样调试。
我安装了 Xcode 8.3.3,并且 Visual Studio 使用它进行编译和模拟。
我安装了 Xcode 9.0.1,想在 iPhone X 上测试应用程序以确保没有任何显示问题。
不想用Xcode9.0.1编译,只想用模拟器
我在 Visual Studio 中看不到 Mac 我选择模拟器 运行 的地方。如何配置 Visual Studio 以启动特定的模拟器?
Xamarin 直接调用 Xcode9 中的 SimulatorKit.framework
vs Xcode8 中的 CoreSimulator.framework
,以便在每个受尊重的 Xcode 中启动 Simulator.app
捆绑并调用它。
所以基本上你所问的在 VS4M IDE 中是不可能的,但是从 cmd 行它使用 Xcode 工具。
您可以使用 simctl
(通过 xcrun
)到 运行 特定的 sim 设备,并在其中安装 app
包。
获取所有支持的 sims 列表(您需要设备 ID (GUID):
xcrun simctl list
启动模拟卡:
xcrun simctl boot BDC5B693-9957-4034-BEFD-D3545F875DF6
显示启动的 sim:
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
在启动的 sim 卡中安装应用程序包:
xcrun simctl install booted /user/sushi/code/gitlab/iPadProGenomeDNADashboard/iOS/bin/iPhoneSimulator/Debug/device-builds/GenomeDNADashboard.app
这样做可以让您将 VS4M/Xcode8-based 应用程序包安装到基于 iPhone 8/8s/X/... Xcode9 的模拟器中并测试 UI.你当然不能这样调试。