Xamarin.IOS Unable to connect to Mac Server with Address - visual-studio

I've just updated visual studio 2019 to the latest build (16.9.4) and now my xamarin.ios won't deploy to the simulator. We're receiving the following error:
Unable to connect to Mac Server with Address='192.168.0.94' and User='My user'. The build can't continue without a connection MyApp.Mobile.iOS
Nothing has changed other then the VS update and have tried on another dev's computer and it's doing the same thing after update. Everything has been updated on the mac side as well to match the VS update.
Any ideas?

Try this
1)On Windows open Visual Studio: Tools=>Options=>Xamarin=>Other and click in Check Now
2)On Mac open Xamarin Studio Community (https://www.xamarin.com/download) Xamarin Studio Community=>Check for Updates... (and download last one)
After updates check if it works fine. If it still doesn't work then try to delete everything from
%localappdata%\Xamarin\MonoTouch
For more information you can checkout this link.

Related

How to overcome "Please select a valid device before running the application." on a paired with Mac Visual Studio on Windows 10

I have a Win10 computer paired with Mac. Until today all things were okay, but today I start getting the message:
Please select a valid device before running the application
when I try to debug an iOS Xamarin application on a selected iPhone simulator.
My configurations:
Mac:
OS: Mac OS Catalina, version 10.15.7
XCode Vesion: version 12.2
Visual Studio 2019: version 8.8.4 (build 30)
Win 10:
OS: Win10 version 10.0.19042.685
Visual Studio 2019: version 16.8.3
Simulator names are available on my Win10 computer, but when I select one and try to debug an iOS application I get the message I reported above.
If I launch debug on the Mac directly it runs and starts debugging on the selected iPhone simulator. But when I do the same on the paired Win10 computer in Visual Studio I get this message.
I searched google and SO for this issue and according to advises downgraded XCode to the most possible version 12.2 that is supported by Visual Studio. But it does not change anything.
I want to debug application only on simulator on the paired Win10 computer.
Is there a way to fix this issue?
Looks like the problem was related to the connection between my Win and Mac computers.
My steps to resolve this issue:
I opened Tools - Options - Xamarin - iOS Settings on Visual Studio on my Windows computer. On the Pair to Mac dialog window I selected "Forget this connection" (right click context menu on the connection).
Next, on my Mac, I turned off Sharing (System - Preferences - Sharing).
Then I restarted my Mac computer. And then turned On sharing again, specifying my username as allowed users.
Next on my Windows computer, in the Visual Studio, on the Tools - Options - Xamarin - iOS Settings section I paired my Mac again.
Voila. All things work as expected!
If anyone else runs into this question today, I found this GitHub issue for XCode 13 issues with Xamarin.ios
https://github.com/xamarin/xamarin-macios/issues/12778
I fixed the issue by manually installing xamarin.ios-15.0.0.6.pkg on my mac (linked in the GitHub issue)
When connecting to mac through visual studio it showed the error "The Xamarin.iOS SDK version '15.0.0.6' that is installed on the Mac is not compatible with this version of Visual Studio. Would you like us to install Xamarin.iOS '14.20.0.25' for you? This will overwrite any other existing Xamarin.iOS installation on your Mac."
But, if you hit cancel it should still connect successfully.
Same issue diff version. VS MAC stand-alone also had some issue as VS WIN connected to VS MAC. Started at some early today. Suspected an update somewhere. Traced issues to auto update of XCode to 13. Solution was to download and reinstall XCode 12.5.1 from Apple Dev site. With XCode 12.5.1 things worked. So, something changed with the API in XCode and Xamarin was not prepared for it.
Restarting Visual Studio in Windows worked for me after successfully building.

Xamarin: publish iOS to App Store from Visual Studio no working

I'm actively using Visual Studio 16.6 windows / 8.6.1 macOS to build and test iOS / Android application, in Xamarin Forms. macOS is running Xcode 11.
I can't push to AppStoreConnect from "Sign and Distribute" directly.
Everything is working fine step by step: build in release for iDevice, signing and distribution profile accepted, export to IPA file, and uploading via Xcode->Organizer. But i'd like to do this simply from Visual Studio; either on my PC or mac.
I have the following errors on Visual Studio / windows when uploading to AppStoreConnect:
Error: unable to create IPA file for distribution of archive myApp
MessagingRemoteException: error happened on client Build160001055 during execution of an answer for category xvs/Build/16.6.0.1055/execute-task/myApp.iOS/c1cf1c8002fCopy
TypeInitializationException: The type initializer for 'Microsoft.Build.Tasks.Copy' threw an exception.
PlatformNotSupportedException: Operation is not supported on this platform.
I have the following error on Visual Studio / macOS when uploading to AppStoreConnect:
Publication failure: we are unable to create an authentification session.
Notice Visual Studio / macOS is asking creds (i'm using developper account) while Visual Studio / windows is not (i surely have it registered before, but i don't remember).
This issue appears to have been resolved in a hotfix (16.6.1) released today, as per this bug report: https://developercommunity.visualstudio.com/content/problem/961282/xamarinios-fails-to-build-with-messagingremoteexce.html

xamarin unable to connect to mac - login failure

i have a mac mini. i am trying to add this to visual studio (version 2015 with update 3). it detects mac, gets the SSH fingerprint, and gives me the login screen. but then i get login failure. i can login through SSH to it without any problem. i can use VNC and connect to it using the same credentials. but i consistently get login failure when trying to connect through xamarin dialog box.
i haven't installed anything on mac, i have only enabled remote login, and enabled all options to connect me to it using SSH and everything seems to be working fine.
i don't understand what i am missing. i'll appreciate any help with this.
You need to install Xamarin.iOS on your Mac as a minimum to be able to connect from Visual Studio - if you don't have the Xamarin tooling installed on your Mac along with Xcode then you cannot build your iOS apps.
You do not need Xamarin Studio installed on the Mac, just Xamarin.iOS, but it is advisable as it makes it easier to update.
Check out our installation guide which walks you through downloading and installing everything you need:
https://developer.xamarin.com/guides/ios/getting_started/installation/mac/
We also have some guides for the Visual Studio side of things which may help if you continue have issues connecting:
https://developer.xamarin.com/guides/ios/getting_started/installation/windows/
I think that you need to install Xamarin Studio for Mac.

How can I upgrade my Xamarin.iOS version from 9.6.1.8 to 9.6.1.9 in windows machine?

How can I upgrade my Xamarin.iOS version from 9.6.1.8 to 9.6.1.9 in windows machine?
I have already checked for updates in Xamarin Studio and also checked for updates in Visual Studio 2015>Tools>Options>Xamarin>Other>Check Now and all is looking up to date but as the error log says, Xamarin.iOS version is supposed to be 9.6.1.9.
Thanks in advance.
Xamarin.VisualStudio.IOS.LogHandler Warning: 0 : [2016-04-05
16:13:04.2398] There is a mismatch between the installed Xamarin.iOS
(version 9.6.1.9) on the Mac MacMiniBuildServer.local (192.168.101.15)
and the local Xamarin.iOS 9.6.1.8. While this may not be an issue, it
might cause unexpected behaviors. When applying updates, make sure to
keep both the Mac and Windows in sync.
When updating Xamarin
ensure that the same release channel (stable, beta, alpha) is used on both machines (visible on the update dialog of each tool).
On Mac
Open Xamarin Studio Open Xamarin Studio > Check for Updates
Download updates
Press Restart & Install Updates
On Windows
Open Xamarin Studio Help > Check for Updates
Download updates
Press Restart & Install Updates
Open Visual Studio Tools > Options > Xamarin > Other > Check now
To be damn sure, close and restart everything :P
If it still appears: see the answer from BytesGuy
There is often a discrepancy in the minor version for Xamarin.iOS between the PC and Mac.
This message can be safely ignored as long as you are on the latest stable version on both you PC and Mac (which you seem to be).
The only time this can become an actual issue is when your major versions are different (e.g., 9.6 on PC and 9.8 on Mac).
It turned out to be a problem with Apple Store Distribution Certificate.
I followed this steps and after recreating the Distribution Certificate, all problem was sorted out, so didn't need to upgrade my Xamarin.iOS version to 9.6.1.9.
Hope this might be helpful for other people.

Not able to find Xamarin.iOS Build Host on Mac

After I installed Xamarin Studio v5.10 (build 871) on my Mac (OS X Yosemite v10.10.5), I can't find the Xamarin.iOS Build Host, even when using Spotlight. I want to pair Visual Studio with my Mac development machine. I found an answer on the Xamarin forums:
I was having the same issue on my Mac and was able to resolve the
issue by deleting the following directories/folders and reinstalling.
/Applications/Xamarin Studio.app /Developer/MonoTouch
/Developer/MonoAndroid /Library/Frameworks/Mono.framework
/Library/Frameworks/Xamarin.Mac.framework
/Library/Frameworks/Xamarin.Android.framework
Hope this helps.
Thx, Leland
I performed these steps and have uninstalled Xamarin on the Mac and then reinstalled, but this hasn't helped. What can the problem be and how can I solve it?
OS-X Build Host has become OS-X Build Agent:
Overview
The Xamarin Mac Agent provides a way for Visual Studio
developers writing Xamarin.iOS apps to connect to a Mac effortlessly
to control the building, deployment, and running of apps. Visual
Studio connects to the Mac over SSH, which provides several benefits,
including:
Ref: http://developer.xamarin.com/guides/ios/getting_started/installation/windows/xamarin-mac-agent/
The Xamarin.iOS Build host has evolved into the Build Agent.
You now don't have to start a separate application to be able to connect to your Mac and compile your iOS apps.
Here's how to do it;
Enable Remote login on you Mac.
With Spotlight search for Remote Login and tick the Remote Login box on the left side.
Select which users or user groups can connect.
Go to your Visual Studio and find the new icon, click it
Find your host, it's probably just one and click connect. Enter your credentials (if you need to) and wait for the chain icon to appear on the right of the selected host.
From now own it should connect automagically. Just wait for the screen in the Visual Studio toolbar icon to turn green.
For more info check the Xamarin documentation.
Also when you're connecting this way for the first time on an existing Xamarin project be sure to do a clean and rebuild to avoid errors.

Resources