xamarin for visual studio not showing simulator li

2020-08-09 07:05发布

I'm pretty new to xamarin, tried to run a sample application (IOS). But Visual Studio says: "Please select a valid device before running the application"

I know on the IOS toolbar, there should be option to select which device to simulate (list of supported IOS devices like iphone 6, 5s etc), but I don't get that.

EDIT: To be more precise, TARGET IOS Device not shown on IOS Tool bar

5条回答
Lonely孤独者°
2楼-- · 2020-08-09 07:44

Another possible cause: Mistakes in editing your iOS platform project's info.plist can cause this to happen.

查看更多
劳资没心,怎么记你
3楼-- · 2020-08-09 07:45
  1. Quit Visual Studio.
  2. Open your XCode.
  3. Restart Visual Studio.
  4. Select your ios app > Debug > "Now you can see list of simulators"
  5. Quit Xcode.

OR If above steps do not work then try adding new build configuration as shown in following image by selecting iphoneSimulator.

enter image description here

查看更多
劫难
4楼-- · 2020-08-09 07:52

Are you sure that the device is connected to the right machine? When I have a VM open on my iMac, I get prompted for which machine I want to connect a device to.

Also make sure that you have Debug and iPhone Simulator selected.

查看更多
来,给爷笑一个
5楼-- · 2020-08-09 07:56

I had the same problem a year back - please check the following:

  • XCode is installed
  • you have started XCode once (to accept license agreement)
  • Xamarin Build Host is installed
  • Visual Studio and Mac Build Host are connected
  • Simulators work on MAC-side when started with XCode (just use a sample project)
  • Check that you are using latest versions of Xamarin (often, there are major bugs in intermediate versions of Xamarin that are updated relatively quickly), also check that they are compatible with your XCode version and that VS and Mac versions are compatible (only certain versions can cooperate)
  • using non-latest versions on Mac side can help (e. g. new XCode releases often are unsupported for a few days till there is an update on Xamarin side)
  • Make sure that iOS project is selected for start
  • Sometimes, you need to re-establish connection with Build host for things to work properly
  • Sometimes, you need to restart your systems
  • You got correct licenses (you need Business or Enterprise on both Windows and Mac)

I think for me it was outdated versions and a hickup in the software, after a reboot it worked.

查看更多
相关推荐>>
6楼-- · 2020-08-09 07:58

I had a similar issue. However, I was able to resolve it by going to XCode>Preferences>Accounts>ViewDetails>Download all. This caused visual studio to now display my device IOS name in the dropdown menu.

查看更多
登录 后发表回答