'IOS simulator is not open
Solution 1:[1]
*** Update 4/13/2022
MAUI RC just came out so I upgraded mac fully and ran with latest VS 2022 preview and Xamarin. Still doesn't work, but at least the terminal error is different. In addition to the different error shown below, it no longer fails but just keeps trying until I hit cancel. I will be trying it with a MAUI app in the near future (and will post an update) as I suspect much of the Xamarin intermittent basic loss of functionality is due to focus on MAUI and nearly complete neglect of testing on Xamarin.
Open Terminal on Paired Mac now shows:
Unhandled Exception: System.TypeInitializationException: The type initializer for ‘Xamarin.Messaging.Terminal.XmaApp’ threw an exception. —> System.IO.FileNotFoundException: Could not load file or assembly ‘Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The system cannot find the file specified. at Xamarin.Messaging.Client.Serialization.BsonSerializer…ctor() at Xamarin.Messaging.Client.Serialization.SerializationManager.<>c.<.cctor>b__3_0() in D:\a_work\1\s\src\Xamarin.Messaging.Client\Serialization\SerializationManager.cs:line 17 at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue() at Xamarin.Messaging.Terminal.XmaApp…cctor() in D:\a_work\1\s\src\Xamarin.Messaging.Terminal\XmaApp.cs:line 24 — End of inner exception stack trace — at Xamarin.Messaging.Terminal.XmaApp…ctor() at Xamarin.Messaging.Terminal.Program.Main(String[] args) in D:\a_work\1\s\src\Xamarin.Messaging.Terminal\Program.cs:line 18
==== Original
I spent a few days struggling with this. If you look at the iOS terminal which you can bring up under tools -> iOS -> Open Terminal on Paired Mac..., you will probably see:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'CLAP, Version=4.6.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) at Xamarin.Messaging.Terminal.Program.Main(String[] args)
Whether this is a deployment issue by visual studio team or not, I'm not sure. I went back to visual studio 17 LTCS version, and still had the same issue which argues against that. In any case, for me it worked once I turned off remote emulator to windows.
To do that, go: Tools -> options... Then scroll down to Xamarin, expand that and click iOS settings. About 2 or 3 sections down, you should see Simulator and below that a check box: Remote Simulator to Windows
Uncheck that. In my case, I also had to close out the simulator that was sitting on the black screen. After that, it opened my app perfectly. It's inconvenient, but I just moved my Mac from back table up to my desk so I can work with the emulator.
On a side note in case someone sees the same, this version also will NOT let me sync certificates / profiles in Tools -> iOS -> accounts as it gives me a security error that I must use XCode 7.3 which in past showed up on people using free apple accounts. I am on XCode 15+ and have had a paid app for years, so that's not the case. I WAS able to sync with all of my corporate accounts. Fortunately, my certificates / profiles are already synced, but if someone can't get started because they lack them entirely, making a corporate account (if appropriate) might help based on my observations.
Hope that helps at least some of the people arriving here!
Solution 2:[2]
I am getting an error in Xcode 13.4 but when I download Xcode 13.2.1 issue is solved
Solution 3:[3]
This happens when the widget is not wrapped with Scaffold/MaterialApp.
Alternatively, try
flutter clean
and then flutter pub get
. It should work then.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | keyur |
Solution 3 | Samia Ashraf |