Getting Unknown Build error in Visual Studio for Mac - xamarin

While trying to build a Xamarin.ios project, it gives me Unknown Build Error, for iPhone Device.
While Building for Simulator it builds fine.
The Error i get is somrthing like below.
Error: /Users/admin/Documents/projectdirectory/AppName.app: unknown error -1=ffffffffffffffff
I am using latest Xamarin and Xcode, and MVVM crosslight.
Please help in resolving.

The issue was with certificate. The app was not able to build properly as it wasn't able to find the certificate.
the issue got resolved by just restarting the machine.

Related

Unable to run Flutter app on iOS because of database locked

I added some images to my Flutter app using XCode, then I closed it and opened VS Code to build the app (since I always use VS Code).
I'm always getting this error:
Error (Xcode): unable to attach DB: error: accessing build database "/Users/username/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
Could not build the application for the simulator.
Error launching application on iPhone 13.
I tried to do some changes like "flutter clean" and reinstalling Pod files.
I also tried to use an old "ios" folder but it doesn't solve the issue.
Finally I tried to use Android Studio but nothing changes.
This happens with XCode closed.
Some advices?

Can not debug on simulator or device anymore

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.

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.

"Failed to resolve Plugin.Permissions.Abstractions.Permission" error when I try to build my cross-platform Xamarin app for an iOS phone

I'm trying to deploy a Xamarin Forms project to an iPhone, but I keep on getting the build error
Failed to resolve "Plugin.Permissions.Abstractions.Permission" reference from "Plugin.Permissions.Abstractions, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null" CyclePay.iOS
where the project's name is CyclePay. In response, I installed the latest version of Plugin.Permission (3.0.0.12) via Nuget, but I'm still having the same issue. Is the problem that the reference is coming from Plugin.Permissions version 2.2.1.0? If so, what should I do to resolve the issue?
Note that the project successfully deploys to Android, and also successfully deploys to an iOS simulator; it's just an actual phone I can't build for. I'm thinking it could also have something to do with the free provisioning profile and signing identity that I created specifically for this project, though I'm not sure what would actually be wrong in that realm. I'm programming in Visual Studio 2017, if that provides any useful information.
Any help would be appreciated!
Thanks,
Anoop Bhat
I updated the library that was depending on Plugin.Permissions (in my case it was Xam.Plugin.Geolocator) and that resolved the error for me.

Xamarin Forms: native error with Microsoft.Azure.Mobile

Today I added to my project
using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Analytics;
using Microsoft.Azure.Mobile.Crashes;
I should use Visual Studio Mobile Center but after that I receive an error for 52 times
/Users/enricorossini/Projects/myInventories/myInventories/myInventories.iOS/MTOUCH:
Error MT5209: Native linking error: warning: object file
(/Users/enry/Projects/myInventories/my/my.iOS/obj/iPhone/Debug/build-ipad6.3-10.1.1/mtouch-cache/MobileCenterAnalytics.a(MSPageLog.o))
was built for newer iOS version (8.0) than being linked (7.0) (MT5209)
(my.iOS)
What can I do to resolve it? Thank you in advance.
Our minimum SDK version is iOS 8.0 and above. In your Xamarin iOS project, open Info.plist file and set the "Deployment Target" to be at least 8.0 to fix the linking error.
Ok, I discovered the problem.
In the Application Output I found that
error MT1108: Could not find developer tools for this 10.2 (14C92)
device. Please ensure you are using a compatible Xcode version and
then connect this device to Xcode to install the development support
files.
I updated my iPad with the latest and I didn't update Xcode.

Resources