Using Xamarin and VS15 on Mac and VM - ios

I'm trying to do some developing with Xamarin. My setup is this:
MacBook Pro running Sierra 10.12.3
-XCode 8.2.1 installed
VMWare Fusion running Win10 VM using Bridged network connection
-Running Visual Studio 15 with Xamarin up-to-date with latest Stable release
I'm still just trying to get everything set up. Originally, I was running Yosemite, so I would get the error that I needed to Accept the XCode terms when I tried to set up my Xamarin Mac Agent, but XCode wasn't even installed (my bad). So, I updated my OS to Sierra and installed XCode. Then, I made sure on the Mac side that my account was included for Remote Login. When I try to connect, it comes back after 30 seconds or so that it "Couldn't Connect". So, if I try another account in the approved Remote Login list that I don't have the password for, it comes back right away that I have the wrong credentials. So that tells me that it must be getting thru to the Mac, but something else is wrong.
Any ideas would be great!
Thanks!

To make the connection between OS X and Windows work, you have to make sure that you're running the same version of Xamarin on both.
On OS X, you need to have Xamarin Studio with the latest stable version of Xamarin and Xamarin.iOS installed. On Windows, you need to check that you have the same version by going to About Visual Studio dialog (Help menu).

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.

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.

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.

Xamarin iOS | Error Connecting Xamarin Build Host from Visual Studio on Windows

We are attempting to connect to a Xamarin build host running on a Mac Mini (OS X 10.11 Yosemite) to a Visual Studio running on a Windows 8.1 Machine. We have updated Xamarin.iOS to same version on both system.
The issue:
My Visual Studio can detect the build host and asks for PIN to pair with the build host. But even if I'm entering the same PIN, it never accepts, and keeps giving this error(PFA Screenshots):
The PIN you entered was invalid.
Please ensure you have entered the correct PIN.
You may have to close this dialog and retry from Visual Studio.
I've restarted both systems and tried to unpair and pair again with new PIN, but no success.
Needless to say, but both systems are on same network and VS can detect the build host.
My Mac Details are in attached image –
Visual Studio Details:
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Connecting to your build host via telnet you should not be receiving any response until you enter HELO.
The response that you are getting before the HELO MTBSERVERPORTS:62592;62595 is incorrect (a Xamarin bug).
objc[66118]: Class WebAnimationController is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.f‌​ramework/Versions/A/WebKitLegacy and /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit. One of the two will be used. Which one is undefined.
If you are running any thing older that the Xamarin 3.9 release, you need to upgrade. If that does not help, either contact Xamarin Support to help troubleshoot why this is happening or upgrade to the Xamarin 4.0 for Visual Studio.
Personally, I would upgrade to the Xamarin 4.0 for Visual Studio (currently an alpha release) as it replaces the PIN pairing with a SSH tunnel that avoids all of the older issues with 3.0 Build Host connection problems.
Re: http://developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.0/
This version also introduces the new Xamarin Mac Agent which replaces
the old Xamarin Build Host with a new approach taking advantage of the
built-in MacOS Remote Login feature based on SSH for a faster and more
reliable connectivity.
First check firewall rule on your both machines if the port (5000) is not blocked.
Second read this link
https://kb.xamarin.com/customer/portal/articles/1733609-additional-build-host-connection-troubleshooting-steps
Try to connect manually by telnet.

Resources