visual studio 2022 installs monoframework 6.12.0.174 on mac, then iOS Simulator fails - ios

I use Visual Studio 2022 on Windows for Xamarin development for Android & iOS. I use a Mac Mini with M1 for the iOS builds. All has been working fine for over a month. A few days ago I allowed the MAC to perform an update. Today when I tried to build for iOS, the Pair To Mac dialog said there was a monoframework mismatch and offered to install monoframework 6.12.0.174 on the MAC. Initially I chose Cancel,and then rebooted both machines. The same error occurred when I tried again. This time I allowed the install. After the install completed, every time I try to use the iOS Simulator it hangs as soon as it appears. I would appreciate some direction. I do not know how to fix it and I do not know how to back-out the mono install on the MAC. Please help.

Solution: I updated Visual Studio & Visual Studio for Mac to the current versions. Then found in the following in the Visual Studio ReleaseNotes:
Known Issues
Deploying an iOS app with Visual Studio 2022 and Apple Xcode 13.3 results in a Remote iOS simulator window with a blank/black screen. Workaround: Disable the “Remote Simulator to Windows” check box in the iOS Settings under the Tools - Options menu. The iOS app should deploy correctly on the macOS host.
Following those instructions I disabled the “Remote Simulator to Windows” check box in the iOS Settings under the Tools - Options menu. The iOS app then deployed correctly, but on the macOS host, no longer can it deploy on the Windows machine from the Mac build host as in prior versions.

Related

Cannot get list of iOS simulators in Debug Target from Visual Studio 2022 on Windows

I have the problem that I'm not able to see the list of iOS simulators in Visual Studio Debug Target on my Windows PC
I've just made a total upgrade of my Xamarin development environment including now latest VS 2022, latest OS on my Mac, latest XCode version 14 and latest version of Xamarin on my PC and Mac. I have successfully paired to my Mac from Visual Studio.
On my Mac I've just tried to refresh the list of Debug devices as described in Microsoft Docs:
Delete your ~/Library/Developer/CoreSimulator/Devices folder.
Run killall -9 com.apple.CoreSimulator.CoreSimulatorService.
Run xcrun simctl list devices.
.. but still no result. All I can select in my Debug Target is Local Device, Remote Device and Simulator.
Before this upgrade I had no problem seeing all the simulators.
I will really appreciate if anybody have some good ideas of what I can do to solve this.
Following is my list of installed components from VS About box:
Xamarin 17.3.0.296 (d17-3#a0ff24b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 17.3.0.208 (remotes/origin/d17-3#e4f67afef)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 17.2.28 (9b3d244)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.iOS and Xamarin.Mac SDK 15.12.0.2 (87f98a75e)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support
Please be noted that XCode 14 is not yet supported in Xamarin.iOS or .NET MAUI, you need downgrade your Xcode version to 13.4.1 and could download it from the downloads page in the Apple Developer Portal. For more information, you can refer to https://github.com/xamarin/xamarin-macios/issues/15954
Update:
Xcode 14 is currently supported and if there are any other issues, please continue to post back to the GitHub.Thanks!
I have this same issue even after installing VS 17.3.6. I have no list of iOS simulators and I get a warning that this version of Xcode is not supported.

Unable to run on iOS Simulator from Visual Studio on Windows

The Issue
Developing on Windows with Visual Studio, and trying to run my app in iOS Simulator.
I'm not fussy whether the Simulator runs locally on my Windows machine, or on the Mac itself.
The Mac is "connected" from within Visual Studio, and Visual Studio successfully installed any missing libraries it required remotely on the Mac.
My app runs wonderfully on Android in both the Android simulator and physical devices.
But I'm unable to get the iOS Simulator to run when launched from Visual Studio.
Environment
Windows machine:
Windows 10
Visual Studio 2019 Preview 16.11.0 Preview 3
Xamarin Mobile Blazor Bindings (doesn't to seem to be relevant, as I've tried creating other brand new iOS-related projects from within VS, with the same result).
Mac
MacBook Air, running Big Sur.
Xamarin.iOS14.20.0.24
Xcode 12.5.1
Simulator 12.5.1
Different Scenarios Tried
Scenario 1 - Enabled Remote Simulator to Windows
Visual Studio → Options → Xamarin → iOS Settings → Simulator - Checked "Remote Simulator to Windows".
Selected "iPhoneSimulator".
Selected iOS project from solution "BlazorHybridApp.iOS".
Selected from the list of available devices "iPod touch (7th generation) iOS 14.5)".
Clicked "Run".
Scenario 1 - Result within Visual Studio on Windows
Scenario 2 - Disabled Remote Simulator to Windows
Visual Studio → Options → Xamarin → iOS Settings → Simulator - UNCHECKED "Remote Simulator to Windows".
Selected "iPhoneSimulator".
Selected iOS project from solution "BlazorHybridApp.iOS".
Selected from the list of available devices "iPod touch (7th generation) iOS 14.5)".
Clicked "Run".
Scenario 2 - Result within Visual Studio on Windows
Error message:
error MT0069: The app directory '/Users/macbook/Library/Caches/Xamarin/mtbs/builds/BlazorHybridApp.iOS/373192a984aab952b21bd389276fc38f881a1f70c8927669096f762b8fab1f51/bin/iPhoneSimulator/Debug/BlazorHybridApp.iOS.app' does not exist.
I checked on the MacBook, and indeed the folder does not exist (I'd expect it to be auto-created as part of the build?).
So, I manually created the folder on the Mac, and reran from Visual Studio with the same settings selected.
Scenario 2 - 2nd Result within Visual Studio on Windows
Error message:
error MT1008: Failed to launch the simulator: Could not find required file '/Users/macbook/Library/Caches/Xamarin/mtbs/builds/BlazorHybridApp.iOS/373192a984aab952b21bd389276fc38f881a1f70c8927669096f762b8fab1f51/bin/iPhoneSimulator/Debug/BlazorHybridApp.iOS.app/Info.plist'.
I checked on the MacBook, and the specified file does not exist. In fact the folder I manually created is empty. I'm assuming this is where Xcode should be generating the binaries, etc.?
Despite the error message, on the MacBook, the Simulator DID launch, but did not launch my app.
Other Info
Big Sur/Xcode newly installed
This is a virgin MacBook, so no configuration changes have been made to the OS or Xcode.
Confirmed Simulator is working on MacBook
I have checked that the Simulator is working ok on the MacBook, by creating a new App project on the MacBook from within Xcode and running it on the Simulator.
Even tried Visual Studio 2022
Out of desperation, I have also tried downloading Visual Studio 2022 Preview which also has the required mobile dev support, but got the same issues.
Any ideas?
Can anyone offer any advice? Would be very gratefully received.
For Scenario 1, it is a known issue and it has been reported here .
According to the latest reply , there will be a release for this issue soon .
For Scenario 2 , I would suggest you
Update everything to the latest stable version (vs for windows , vs for mac , Xcode).
Delete bin and obj folders in Forms and iOS project , rebuild and try again .
If problem persists try to create a new project and test .

iOS Simulator Black Screen Issue Windows

I am having trouble with the iOS simulator and I was wondering if anyone else had the same problem or had any suggestions. I am very new to Xamarin; I just completed the Hello, World tutorial for iOS. I was able to build all with no errors. When I attempt to launch the app in the simulator, it displays a black screen.
I'm using an iMac running Parallels with Windows 10 and Visual Studio Enterprise 2017. I created a new Mobile App (Xamarin.Forms) project under Cross-Platform. Using the latest XCODE (v 12.0) in iMac to get the simulators.
Main Interface in Info.plist is set to "(not set)". I tried changing it to LaunchScreen but still get the black screen.
I created a hello world project in xcode and it works fine. Black screen issue is on Windows side. Let me know what I'm doing wrong. Thanks.
If you need to run iOS 14, you will need a Visual Studio 2019 in PC.
Run Xcode 12 – Run Xcode 12 before updating and running Visual Studio for Mac or Visual Studio 2019, as it installs some tools that Xamarin requires.
And the Visual Stuido 2017 supports the last version is iOS 12.
Run Xcode 10 – Run Xcode 10 before updating and running Visual Studio for Mac or Visual Studio 2017, as it installs some tools that Xamarin requires.

Xamarin App running in Ios simulator using visual studio

I am facing the issue to run the xamarin app in IOS simulator. Whenever i am trying to run this app it was asking me to add or pair the Mac. Since I dont own the Mac I tried to install Xamarin.Ios in windows. In this process i need to install the XCode in my windows 10 Os. First of all i am unable to download the Xcode tool from Apple portal with valid credentials. I followed the below 2 links but no luck to download and install the Xcode. Could you guys please help me the easiest solution to download install the Xcode to do the next level of run the App in windows.
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/?pivots=windows
https://apps.apple.com/us/app/xcode/id497799835?mt=12
Bottom line is that iOS apps must be build using a licensed Mac OS, period. Visual Studio for Windows does not actually build the iOS app, what it does do is connect to a Mac (which must have XCode installed) and facilitate a remote iOS build via XCode. However, if you have a Mac, you can build both iOS and Android code directly on your Mac using Visual Studio for Mac. Yes, it is frustrating that you must have access to a Mac OS to build iOS apps, but this is a requirement and there is no way around it.

Launch failed. The app could not be launched on xamarin

I am getting the following error when trying to run Visual Studio/Xamarin built application on the IOS Simulator.
Launch failed. The app 'App2' could not be launched on 'iPhone 7 Plus iOS 10.1'. Please check the logs for more details.
"App2" was created using the Tab Template, and NO code changes after rolling the application.
Windows environment: Windows 10 w/Visual Studio 2015 update 2
Mac environment: IMac Sierra fully patched. XCode 8.1 (what ever is most up to date).
I have connected the mac remote and pc. I can launch the iPhone simulator on the mac from Visual studio on the PC.
I get the error when trying to run "App2". It compiles fine, just won't run on the simulator.
I've searched here, and similar results speak of VS Crashing. Mine doesn't crash, just presents the error. NOTE: There's nothing in any log I can find with details by the way.
Ideas? Thanks!
EDIT: Just loaded up Parallels on the IMac and ran Win 10/VStudio. I get the same error. Again, xamarin remote agent connected and I can start the simulator from the PC, i just can't deploy to it.
After all the research and help from those here it comes down to a bug with the current version of Xamarin. Options are to wait until a new stable build is on the Xamarin site or get builds off of GIT. I'm choosing to wait, as I've not had great luck working with interim builds.
Xamarin that downloads with the new VS 2017 fixes this bug.

Resources