Visual Studio 2015 / Xamarin, Debug not working: an error occurred while executing MTouch - ios

I'm trying to get an answer on here before uninstalling this software and developing straight on Mac after spending 4 hours trying to figure this out. I just installed all these programs on both machines (VS15/Xamarin on Windows 10, Xcode/Xamarin on iMac, both on the same network). Mac Agent is connected, I have a Developer account on XCode, a device linked to my account, everything looks fine.
When I create a basic app (I don't even add a line of code, just a blank single view app) on XCode (iMac) and launch the simulator, it works just fine. I get the view of the device etc... When I do the same on my Windows machine, I can't debug. I get the error "The app could not be launched on 'iPhone SE iOS 10.2'. An error occurred while executing MTouch."
I looked all over the place searching for a solution. I removed the Entitlements.plist file, I also checked for updates on everything (as some suggested on StackOverflow). Nothing.
So I tried an Android app to see if that works and no issue there. I get the device I pick, shows a black screen because the app is empty, as expected.
If anyone can guide me before I uninstall this whole thing and code directly on a Mac, it would be greatly appreciated. Thank you!

Restarting Visual Studio and cleaning iOS project worked for me.

Related

Xamarin.iOS Archive error Codesign exited with code 1 (Visual Studio 2022)

Its been a very stressful 3 days attempting to archive this iOS project. I hope someone can help. I have searched the entire internet twice and tied everything ive come across to no avail.
Okay to start, it Builds fine and deploys within the simulator on my Macbook). Im using a windows machine with remote deployment to my Macbook
Certificate has been created for Development and Distribution
Provisioning profile is in place
Configuration -> Release, Platform -> iPhone
Trust Authority - Apple Worlwide Developer (Latest with expiry 2030)
Bundle id in plist matches com.companyname.{appname}
Only issue i cannot seem to solve is Automatic Provisioning, if i change this i get the following error. Im assuming i need to setup a specific device for this. Ive setup my macbook in devices, but it would appear that because im using windows , the device id needs to be the windows machine to be recognised and is not using the remote machine (UUID for windows is not recognised and there is no option of Windows within the developer portal).
Looks to be failing on creating the provisioning profile. Not sure how this works with automatic but assuming its trying to use that visual studio wild card.
Error when i archive (note the issue is not related to vlc, removing causes an error on a different control) seen alot of posts about this error message being invalid in reference to the control.
Thanks to all who takes a look
Kevin

Deploying Xamarin.Forms app to iOS: MT1006 EOF Error (error: 0xe800000e)

I am trying to run a Xamarin.Forms app on my iPad and getting the following error:
Launch failed. The app 'AppIOS' could not be launched on 'My iPad'. Error: error MT1006: Could not install the application '/Users/mycompany/Library/Caches/Xamarin/mtbs/builds/AppIOS/someguid/bin/iPhone/Debug/my.app' on the device 'My iPad': EOF Error (error: 0xe800000e).. Please check the logs for more details.
This app has previously ran fine on the same device. The iOS build and deployment process seems very unstable so it often takes multiple attempts so I'm used to having to restart Visual Studio, the Mac it builds on and the iPad and generally wasting a whole lot of time. I have restarted everything involved here multiple times but this error persists. I have checked the device logs and there are no related messages or even any messages at the appropriate times.
I'm using Visual Studio 2017 (15.9.4), Xamarin.iOS and Xamarin.Mac SDK (12.2.1.12), building on a Mac Mini running macOS Mojave and XCode 10.1, deploying to an iPad Air (A1474) running iOS 12.1.1. As far as I'm aware there have been no updates to any of these since I last had it working. The UWP version of the app runs fine.
I can find a lot of MT1006 issues but none with EOF Error (error: 0xe800000e) and I can find no information about this specific error at all. Can anyone enlighten me on what this means?
Sounds overly simple, but I just had this issue and I solved it by restarting the iOS device and redeploying it. Specifically, I was deploying to an iPod 6th Gen and I held the power and home buttons until the screen turned black, this is more of a hard restart. Then let the device reboot and try deploying again.
NOTE: Don't hold the power and home buttons too long, because if you do, the iPod will go into a factory reset restart.
Try pulling up the device in Xcodes' devices tab. I did and realized the device had an error within the tab. I then disabled the "Connect via network" button, then things started to work properly.
I am agree, Xamarin build environment on iOS part is very buggy.
In any case of unknown error in such config: VS<->MAC<->iOS Device try these steps:
Try to switch Off and On Mac wifi.
Reconnect VS to Macbook and Macbook to IPhone.
Delete bin and obj folders on Macbook
Check your PList and Entitlements file(as example wrong aps-environment setting can cause installing errors)
Check your sign project settings
5a. Check your provisoning profile term
unistall application from ios
rebuild and run project again
I'll appent new lines in case i'll remember something else.
What you described happened to me and solved by 1,2,7

iOS App starts but is always terminated immediately before app opens

When trying to start an app in debug mode from Visual Studio on a real iOS 10 device, VS will display "Launching app", and then immediately follow up with an "App terminated" message.
No detailed error can be found in the device logs.
I have tried several things, including deleting caches, restarting, reconnecting, rebooting devices and Mac Agent.
I have followed this bug issue to clear caches (https://bugzilla.xamarin.com/show_bug.cgi?id=43239) but with no success.
Also I made sure that all entitlements are correctly described.
After some investigation it turns out that XCode was displaying a tiny message, that this version of XCode was incompatible with the device.
This message is not carried through to Visual Studio.
Update XCode!
Second, possible solution from the bug tracker (https://bugzilla.xamarin.com/show_bug.cgi?id=43239):
Delete contents of
%AppData%\Local\Xamarin\MonoTouch\ on windows machine
$HOME/Library/Caches/Xamarin/XMA on mac machine
Hope this saves somebody else some time.

Can't compile iOS-App in Ad-Hoc mode (Xamarin.iOS)

So basically I'm following this official Xamarin guide to release my app in the AppStore.
However no matter what I try (changing signing profiles, different build options) the solution-process crashes every time after 1-2 minutes with different errors that don't explain what exactly went wrong (signing error, user aborted?!, etc.).
After the error is shown I always have to reconnect to the Mac.
What could be the problem?
EDIT:
Tool exited with code: 1. Output: CSSM_SignData returned: 800108E6
/Users/metadokentwicklung/Library/Caches/Xamarin/mtbs/builds/mWIDAS_iOS/806c20450998d745a5c8df0e4928100f/bin/iPhone/Ad-Hoc/mWIDAS_iOS.app:
errSecInternalComponent mWIDAS_iOS
I tried the publish profiles (Ad-Hoc,AppStore,automatic) and provisioning profile.
Okay solved the problem myself a few days ago. Dumb mistake on my behlaf.
I use the same monitor for the Mac Mini and the Windows PC so I didn't see the popup on the Mac prompting me to accept the use of the keyfile.
After I agreed to it everything worked like a charm.
I resolved this issue by:
Cleaning my solution
Closing VS4Mac
Shut down Macbook Pro
Start Macbook Pro
Reopen my solution
Build iOS head project (I am working in Xamarin.Forms)
And it built successfully this time. I am noticing lots of issues from Windows VS are creeping into VS4Mac by each update. Not sure why this was happening but that resolved my issue

ios Simulator Could Not Find The Application To Simulate

I'm having trouble with the iOS simulator. I'm currently on 10.7 and was using the simulator to test my website. During the testing, I switched the iOS version via the tool bar, and the application froze and quit. Upon restarting, I get the following error message, with a finder window, inviting me to choose an application:
"ios Simulator Could Not Find The Application To Simulate"
Here's what I've tried to fix the issue:
1: Attempt to identify the application it needs, but the only thing i could see to open was a printer app and the ios simulator app, which just results in a "only one iOS simulator can run at a time" error message.
2: Restart the Mac.
3: Download the new Xcode tools from the app store.
4: Restart again.
None of this has helped, and I'm really stuck without it at the moment. If anyone knows how to resolve the problem, I would be grateful to hear any suggestions. Thanks.
Give this a shot.
Open up a new shell, and shoot of this command: sudo <Xcode>/Library/uninstall-devtools --mode=all (assuming thats the location of the instal).
Then run the Xcode installer you got from the app store.
This removes all the plist files that were also installed with xcode, which aren't removed when you simply reinstall. This is as close as you can come to a complete xcode refresh without reinstalling your OS.
Here's an alternative solution that worked for me... the answer selected here did not. I created a blank, "hello world" project and simply ran it. When you run the app, it sends the app to the simulator and voila! iOS Simulator has an app to simulate. From that point forward, you should be able to open the iOS Simulator without a problem.
After a while longer trying various things, it seems like I may have fixed it.
When asking for an application to open, I opened Xcode, and (weirdly) that opened up and left the testing shell visible, with the tool bar intact. I then selected the current version from the device options and hit the home button, and suddenly everything appeared.
Weird thing to have suddenly happened, but there you go.
I still can't test in iOS 3, so that's a bit of a problem, but not a disaster either!

Resources