Can not debug on simulator or device anymore - xamarin

I was able to debug my Xamarin.iOS app on my physical device and simulators just fine until this morning. I think it has something to do with the recent iOS update. When I try to deploy to my physical device (iPad) I get this message now:
error HE0003: Could not load the framework 'IBFoundation' (path:
/Applications/Xcode.app/Contents/Frameworks/IBFoundation.framework/IBFoundation):
not found.
And I can't deploy on any simulator anymore, I get this message
Lower the deployment target to see older simulators or check you Apple
SDK path
I didn't have these problems yesterday and I've been working on my app for months without this problem. I updated Visual Studio, Xcode, and my Mac, but these problems still persist. Any idea how to fix?

It is a known issue that you can follow here: https://github.com/xamarin/xamarin-macios/issues/12778
Also there are few workarounds that work mentioned in the issue.

Related

Undefined symbols building Unity project w/ Google AdMob on Apple M2

After restarting devices, cleaning projects, deleting and rebuilding, updating iOS on target device, updating Xcode on Apple MacBook Pro with M2 chip, and trying commands found online (Apple, GitHub, Stack Overflow), I am still getting the errors below when attempting to build to my iPhone using Xcode:
I also have this error in Unity:
I just updated my iOS to 16.3, and now realize that in Xcode > Build Settings > Deployment > iOS Deployment Target, the max value is iOS 16.2, which could now be causing an issue, but I was getting the same error even before the update and with the target mistakenly set to iOS 11. Edit: I tried my wife's phone with 16.2 and the target set accordingly, and am getting the same errors.
My macOS is on Ventura 13.1 and Xcode is at Version 14.2 (14C18).
I should also note that building to the simulator does not work either, and I read from a Unity rep. on GitHub that this is not supported.
This is for an app I initially built with Godot, but for the life of me couldn't get to build with Xcode after Google AdMob was integrated, and so I went as far as purchasing this new computer to see if a fresh start would help with the latest model, not realizing the issues some face with the M1/M2 chips. Alas, I still faced issues and so decided to rebuild the entire app in Unity, and now I am still facing build issues. So that is my way of saying I really appreciate anyone's insight into this issue. TYIA.

Xamarin UITest for Android: POST Failed

With my project upon running UI Tests I get POST Failed error. I can't figure what is the cause of the problem. UITests Post Failed in Xamarin.forms, related to the same issue did not help.
On an actual device I get Instrumentation backend app installed (it runs as a server for UI Tests). But I am still getting POST Failed error.
How to fix this issue?
The problem is related to the Android OS version.
Instrumentation backend application does not work properly on new android os-es.
I created a simulator with older Android OS (Android 6.0 Marshmallow).
And ran UITests with this simulator selected in Visual Studio.
And all things worked.
Hope it will help someone who struggles with the same issue.
Old school things are better than new ones.

Xamarin - Cannot use iOS Emulators?

Visual Studio 2019
I recently upgraded Xamarin.Forms to version v4.5.0.530. This required me to upgrade xCode on the Mac to 11.4. This required me to upgrade the Mac OS to Catalina. OK I did all of that. Since then though:
If I run the project on the iPhone connected to the Mac it still WORKS fine (as before).
However, if I try and use one of the emulators on the PC (ipad etc) it FAILS to deploy with the following message:
Selected device is not a physical device. Please select a valid device before deploying the application.
Well obviously it is not a physical device!?!
Of course I am doing everything the same way I did it before the upgrade, choosing Debug, iPhoneSimulator, my iOS project, iPad Pro (9.7... etc)
So, it works on the physical iphone but not on any of the apple emulators (android phone/emulators work fine).
Has anyone any ideas why this might be?
It was a setting at Solution level. For some reason with 'iPhoneSimulator' selected at the top, against the iOS project 'iphone' was selected. Changed it to 'iPhoneSimulator' and all is good in the world again.

Xamarin.Ios App terminates while starting (in Simulator and iPhone) only stating "The App has been terminated"

I am developing a Xamarin App for Android and iOS on windows. For iOS compiling, I pair with a Mac Mini.
I was forced to update MacOS, XCode, VisualStudio for Mac and therefore Xamarin. On Windows I also updated from Visual Studio 2015 to 2017.
After the updates, Android version works still fine.
The iOS App pairs, compiles and provisions successfully, but whe the App starts (either on simulator or real device), it shows the launch screen and after a few seconds quits back to home screen. It even says "successfully launched" but then terminates
The only logs I get are:
"The app has been terminated" -> on windows, in Debug Window
"Service exited due to SIGABRT" -> on mac, in simulator log file
I searched the web and tried lots of stuff:
Delete obj and bin folders
Clean, Rebuild, Restart VS, Restart Mac, Restart PC, Restart....
Deleted all Provisioning Files and Certificates, recreated them
Used Automatic provisioning, used Manual provisioning
Debug and Release Configuration
iPhone Simulator and Real Device
Sadly nothing worked and I cannot get more info why this happens.
Does somebody have or had the same issue and found a solution? Do you have suggestion what more I can try?
I would really appreciate any help.
Thanks
Edit:
As requested, a Screeshot of my build properties:
I am having the same issue. Restarting the device seems to be the only thing that works, but it's unreasonable to have to restart the device every time I want to run the debugger.
So I finally solved the problem...
I created a new iOS-Project from scratch, added the existing Xamarin.Forms project and copied the files from the original iOS project one by one. I also downgraded all firebase plugins from 5.x versions to the highest 4.x versions and xamarin forms from 3.x to 2.5.x and now the app runs in the simulator and bundle signing works also.
Thanks for your help, I hope my answer will help anyone with similar issues

Xamarin Forms app not showing in iOS simulator

I've got a Xamarin Forms app that previously worked well on both android and iOS simulator. After updating VSCode and XCode on Mac, I'm not able to launch it again.
The app builds well, with no errors, but with a warning that says:
Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Xamarin.iOS". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (MSB3245)
Nevertheless, it compiles, but when I launch the app on debug (or release) mode, it launches the iOS simulator, and then I can see the pause and stop buttons on VSCode as it was running, but the app is not installed in the iOS simulator and I see no changes on the simulator, just the main screen of iOS.
No breakpoints are active and, if in Windows I connect Visual Studio 2017 to a MAC virtual machine, I can launch the app, but it's pretty slow, so I need it to work on the MAC VM.
I've also tried to reinstall XCode and to reset settings on iOS simulator with no luck.
Any thoughs on what could be causing this problem?
First, make sure that all the tool versions are up to date. If the problem persists, you can delete two folders of bin and obj under the iOS project. They retain the old version of compilation information. Once the deletion is complete, you can rebuild your project.
I've solved it. It seems that visual studio didn't have permission to open the default projects folder (I don't know why this changed when I updated it). I've changed the default folder to another path, in my case, Downloads folder, and now the problem has gone. Pretty strange though.

Resources