Visual Studio - Xamarin forms application not deploying onto iOS through "Pair to Mac" - ios

I have a Xamarin.Forms application that has suddenly stopped deploying onto the iOS simulator when I use the "Pair to Mac" option on VS 2019. VS pairs to the mac with absolutely no problems, and it gives me the option to pick my simulator here:
However, when I click to deploy the app, the build and deploy stops almost immediately, and this is shown in the output.
It doesn't even look like it's trying to deploy it! I don't know why this has happened as it used to work with no issues until recently.
(Edit) I have the latest version of Visual Studio Community 2019 (16.8.4) and Xcode (12.3).

Related

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

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.

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 iOS App deployment

The docs from Xamarin aren't explicit as to where an iOS device needs to be attached. I'm using VS to build a Xamarin app through a remote Mac Builder (connected via VPN) but my iphone is attached to my PC with Visual Studio. Its completely unclear as to whether or not you can deploy a compiled to from the PC you're running Visual Studio on or whether the iOS device needs to be USB'd to the remote Mac running the build.
Even though Xamarin offers developers the way to use C# creating native iOS applications, we also need to pair to a Mac which is required for compiling native iOS applications. So of course if you want to deploy on a real device, you need to connect it to the Mac.
It seems you have already known how to create a provisioning profile. This documentation tells you how to pair to a Mac to deploy applications. Also before doing that you also need to complete the following steps:
On a Windows machine, install Visual Studio 2017
On a Mac, install Xcode and Visual Studio for Mac

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.

Visual Studio 2015 hangs on deploying cordova application

I'm trying to build a blank cordova application into my iPad Air 2 with Visual Studio 2015 Enterprise edition as i've already done it with success with the release candidate version.
I've got node.js v 4.2.2 on both machines since version 5.2.0 was hanging the build indefinitely, i've also got latest version of iTunes (12.3.1) as well as iOS 9.2 on the mobile device.
I've got the remote MAC set up and everything works fine for the building part, infact i've checked and the .ipa file is there at the end of the build into the folder ...\Documents\Visual Studio 2015\Projects\BlankCordovaApp1\BlankCordovaApp1\bin\iOS\Debug and if i launch that it will correctly install into iTunes and the iPad itself.
The problem is that the build action with Configuration "iOS" and "Local Device" with the iPad connected to the windows 7 PC will hang indefinitely after copying back said .ipa file after writing this line into the Build Output:
2>------ Deploy started: Project: BlankCordovaApp1, Configuration: Debug iOS ------
No matter how much time i wait it wont start the debug session even if i authorized the pc onto the iPad and have my web Inspector turned on onto the safari options. At this point i have to interrupt the build to be able to work again.
What really gets me is that if i connect the iPad to the MAC machine and build with "Remote Device" option the build works fine and i can debug remotely from my windows pc, unfortunately working like that isn't an option since the Apple machine isn't in the same room of my developing machine.
Any insight about this issue would be really appreciate, thanks in advance.
You are using a recent version of node and thus will also need to use a recent version of Cordova.
Specifically, you need to use Cordova 5.3.3 to be able to use Node.js 4.x.x+. The hang you are experiencing is exactly why. It's an incompatibility with a down stream node module and Node 4.x.x. You can downgrade to Node 0.12.x or upgrade your Cordova project to 5.3.3.
http://cordova.apache.org/news/2015/09/22/tools-release.html
Note that Node 5.x.x is only supported in Cordova 5.4.1.
This should be addressed in the latest VS Tools for Cordova Update 6. Deploying to local device is now available.
Take a look at http://microsoft.github.io/vstacoblog/2016/02/04/announcing-update-6.html.

Resources