Error MT0026 on Xamarin Forms - ios

I'm trying to run an iOS simulator from my Xamarin Forms project. I had it working a month ago, and when I returned to it, I get the following error:
error MT0026: Could not parse the command line argument '-sdk': Version string portion was too short or too long.
I updated all the NuGet packages and updated Xamarin itself.
The only thing I can find on the issue is here: Xamarin.iOS Errors
Also, my mac is up-to-date and I made sure xcode was up-to-date as well.

I had exactly the same error when I first started Visual Studio on MacOS. For me the list of device emulators was empty. The only available device listed was "Generic Device". After I restarted Visual Studio all available simulation devices turned up:

Actually this appears whenever you make an important OS update. Why?
Because usually something gets changed into Xcode and one needs to open the app to agree whatever they want you to agree.
After that, restart Visual Studio and everything is back to normal.

Related

Xamarin iOS project suddenly gives 200+ errors (Visual Studio for Windows)

After four weeks, I returned to my Xamarin project in Visual Studio to finish my app, I updated Visual Studio on my Windows PC, I updated XCode on my Mac and when I try to launch emulator, I get this:
I changed nothing in the code, it worked previously. The only thing I can think of that could f*ck all up is I was trying to prepare my app for testing (so I was doing some stuff in developer account settings, provisioning etc.)
Does anyone know how to fix this, or at least what it means?
Thanks!
Okay, turns out the problem was in version mismatch :) All I needed to do was click "Update on Mac" in the "Connect to Mac" window.

Xamarin Visual Studio ios simulator not working

We recently acquired mobile solution that contains an ios and android project. Android project runs fine. When i run the ios project i get error stating
My environment is a windows laptop and a macbook pro running visual studio from windows.
I can pair to mac just fine
I am using automatic provisioning which appears to be correct since my team shows up in the team dropdown.
I feel like i did the provisioning correct because team would not show up in dropdown if not.
I have latest xcode installed on mac
I verified simulator runs fine on mac by starting through xcode
In the videos i watched as soon as mac was paired then more options appeared besides just simulator. (ipad, tvos, etc)
One question is when i registered my device i used the UUID from the macbook and not UUID of simulator. Could not get straight answer for this.
To be clear i am just trying to run the simulator and not a remote device.
Honestly i just want to be able to test the ios application. It should not be this many steps to just run a test. Is there a more simple way to test or am i on the right track?
Updating visual studio on my windows machine did the trick. I really wish the error would give me some kind of warning that would lead me to the conclusion that i needed to update visual studio. That would have saved me many hours.

error HE0003: Could not load the framework 'CoreSimulator' :not found

I want to develop crossed based apps and chose the xamarin platform, but when I start my visual studio and try to run the hello world application, only the android emulator is running well. If I try the iOS emulator, it gives me this error
error HE0003: Could not load the framework 'CoreSimulator' (path:
/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/CoreSimulator):
not found.
I am working on a MacBook and my XCode is up-to-date, so I really don't know the problem
I also ran a XCode hello world project and there the emulator reacts well.
It took me a couple hours but I got mine working after being in this state. It was a two step process.
First, I updated Visual Studio for Mac to all the latest versions.
Then, per this thread, I used VS4M to create a new Xamarin Forms project and run it.

Why is Visual Studio TACO unable to find the app I am trying to debug?

I am using visual studio running in parallels on a Mac. The Mac functions as my build server for iOS. I am trying to get debugging working from visual studio for both the simulator (iPad Air iOS 9.3) and an actual device (an actual iPad Air). For now, it may be helpful to just focus on the simulator first.
When I try to launch to a simulator (iPad Air) from visual studio, or to an actual device my application launches on the device or simulator before visual studio appears to hang for a few moments, ultimately reporting the following error message:
We were unable to find the app you're trying to debug. Check that the >device is connected, awake, and unlocked. Also, make sure it has Web >Inspector enabled.
The device is connected. In the case of the simulator there is no device to connect.
The device is awake and unlocked. In the case of the simulator there is nothing to awaken or unlock. The application launches while visual studio is still debugging just before an error message is returned.
I have checked and double checked to see that web inspector is enabled on both the device and inside safari on the mac. I am able to run the build from XCODE and debug through Safari.
It seems unusual that the application actually opens in the simulator before visual studio returns with the error that it is unable to find the app. If visual studio is unable to find the app then why did it launch?
I will be most grateful for any assistance.
Environment [Updated]
I am using a MacBook Pro running Windows 10 in Parallels.
Windows Configuration
Visual Studio 2015 Update 2
Cordova 6.1.1
TACO Updated 8.1
Node 6.0.0
MacBook Pro Configuration
Cordova 6.1.1
Node 6.0.0
iPad Mini 2 running iOS 9.2 (13C75)
iPad Air 2 running 9.2.1 (13D15)
Update 1: I have installed visual studio update 2 and still get the same error message. I appreciate the suggestion though!
Update 2: Thank you for the suggestion. I edited the config, changed the timeout settings and restarted the build server as suggested. The error attaching to an actual device has changed into a warning with the same result. The simulator maintains the same error.
Now the warning reads:
Timed out launching the app. Check your network connection to the mac and try >again. If you are launching to a device, make sure you have Web Inspector >enabled on it.
I do have web inspector enabled. It does not seem visual studio is waiting the full minute before coming back with an error or warning. Furthermore, the visual studio environment appears to hang (not responding) while it is attempting to attach to the device or simulator.
I have tried on multiple networks as well and get the same results.
Is there any additional information I may provide that may be of assistance?
Update 3:
Any other suggestions, or additional information I may provide? I am really stumped here. Fortunately this is not a showstopper as I am able to do some debugging in safari when deployed to the device but it is frustrating.
Is it typical for visual studio to appear to hang when trying to attach to the device to debug?
I also do not believe visual studio is waiting the full duration of the timeout settings that have been configured.
I have updated every dependency I am able to think of and made sure the cordova versions match on ios and windows. I am stumped here...
I increased the amount of memory available to the Windows 10 VM from 4GB to 5GB and the debugger is now attaching as expected without error.
I am posting this in the event it is helpful to someone else.
What you're seeing may be the result of a timeout in the remotebuild tools, this can happen for a variety of reasons (including general network performance). Take a look at the following answer to another post (Apache Cordova/Visual Studio 2015 tools fails to launch app in IOS simulator) for some guidance re: how to change the timeouts
first run remotebuild saveconfig in macos terminal
Open the RemoteBuild.config file in the Text Editor from the path of the previous step
Change value of appLaunchStepTimout to 60000 (1 min)
Change value of emulatorLaunchTimeout to 60000 (1 min)
Save the file
run remotebuild on terminal
Run the project from Visual studio again
I have across the same error occasionally, but it has been happening a lot less with the latest VS 2015, Update 2 TACO Update 8.1 - If you can update to that level (VS2015 Update 2), it may resolve the issue for you.
I still occasionally see this error with Update 2. But, it usually happens on a non-incremental (full) iOS build and appears to be timing related. Update 2 fixes many issues though, so I recommend that you upgrade.
Edit2: The issue manifested itself one more time, so it wasn't a definitive fix, but it works fine for the most part now.
Edit: I have reset the iPad settings from Settings -> General -> Reset -> Reset all Settings and now it seems to work.
I have the exact same problem when testing on my iPad 1, but it works on my iPhone 6. They are both running iOS 9. I don't have any other iOS devices to test on, so I can't draw any exact conclusions from this.
I faced the same problem as you.
and I just tried to change from debug to release and everything is solved.
and i can do debugging to.
it is strange solution but on the error it says that it cannot just debug so that's why i thought about this.

Building iOS App does not update on iPhone or Simulator

I am trying to get an iOS project started with Xamarin.iOS for Visual Studio linked to a Mac build host and connected iPhone.
I have started dummy projects in Visual Studio on my PC, Xamarin Studio on the Mac, and XCode 7 on the Mac. They all share this problem.
I have tried running the build on both the physical iPhone and a Simulator on the Mac. The problem persists for both despite all my efforts.
The problem is this: The first version ever built of the test app is the one that runs. If I make ANY changes and rebuild, those changes will NEVER be reflected in the app running on the phone or simulator. It will ALWAYS run the first build I ever made, and the debugger refuses to attach.
I have tried deleting the app from the phone between builds. I have tried deleting all bin and obj files from all projects in the Visual Studio solution between builds. If I could find any similar files on the Mac for Xamarin Studio, XCode, or the Xamarin Mac Build host, I would delete them too, but I'm unfamiliar with the build process or file system of a Mac. Still, this is a problem that shouldn't be happening Regardless.
I have even tried restarting Visual Studio. I would have tried restarting the other parts of my setup (the Xamarin Build Host, Xamarin Studio, XCode, the iPhone, and the iPhone Simulator), but decided not to bother, since restarting components between every build is unacceptable and not a solution.
All searches I do on the web only bring up topics related to Apple Provisioning for test deployment. Nothing useful. Very frustrating. Does anyone have any idea what might be going on here?
Edit: Correction. Changes made in Xamarin Studio on the Mac are reflected on build/run, but not from Visual Studio on the PC linked via Build Host, or from XCode.
Also note: All 3 test apps use the same app identity in their plist files ("com.somecompany.-"). And when building in one environment (say Visual Studio) it WILL overwrite the version from the last environment used (say XCode), but it will still use the first version ever made in the environment being built from.
So for example, if the main page on the Visual Studio project has a label saying "This is the VS version.", and the XCode project label says "This is the XCode version.", I can build/debug in either one, and the label will say the expected thing on the phone.
But if I change those labels in some way, like by adding " duh..." to the end of them so they say "This is the VS version. duh..." and "This is the Xcode version. duh...", no matter how many times I build and run in either environment, the app will still just say "This is the VS version." or "This is the XCode version."
Partially solved. (Solved for Visual Studio with Build Host, not for XCode)
In Visual Studio, the test project is a Xamarin.Forms solution, meaning that it consists of a library project--"TestApp (Portable)"--and other projects for each platform it should build for--"TestApp.iOS", "TestApp.Driod", etc.
By right clicking on the solution and bringing up its properties, then going to Configuration Properties -> Configuration, I was able to see that the library project was not set to build for some reason. So the iOS project would build, and everything would LOOK like the compiler was doing it's job, but the iOS project was still building off the non-rebuilt library.
After checking the box for "Build" on the TestApp library project and applying, everything worked. The debugger even attaches again.
Unfortunately, XCode still remains an unintuitive and mysteriously useless piece of scrap. Answers regarding its behavior on this matter would still be appreciated.

Resources