Questions tagged [xamarin]

Xamarin is a platform consisting of Xamarin.iOS, Xamarin.Android, Xamarin.Mac and Xamarin Test Cloud. It allows you to write cross-platform native Apps for iOS, Android and Mac and follow your app through its entire lifecycle. The introduction of Xamarin.Forms supports Native UI development for iOS, Android and Windows

is a platform consisting of , , , , and . The platform provides tools for the entire lifecycle of an App - developing, test and DevOps. This platform allows you to write cross-platform native applications for , and using , allowing you to share a lot of code between platforms.

Tag Usage

When using the , you should also include the related Xamarin platform tag your question relates to.

If you are describing a question about a crash in your app, please include a complete stack trace and, preferably, a minimal reproducible sample.

History

Xamarin was founded in May 2011 and is headquartered in San Francisco, with an engineering office in Boston, MA. Xamarin was acquired by Microsoft in February 2016.

At Microsoft's Build 2016 developer conference on March 31st, 2016, Microsoft announced a new licensing scheme; including Xamarin with all Visual Studio and Visual Studio for Mac versions, including Visual Studio Community edition. And now, Xamarin is free for anyone to use with Visual Studio, on either Mac or Windows

Xamarin created the Xamarin Platform which includes Visual Studio for Mac as well as a plug-in for Visual Studio on Windows, which can be used to develop native mobile applications for Windows, iOS, and Android platforms using the .NET framework.

The Xamarin Platform includes Xamarin.iOS, Xamarin.Android, and Xamarin.Mac (for macOS), which allows for the development of C# and .NET applications with full access to the native APIs. This allows for code sharing between platforms and the creation of applications for multiple platforms with a native user experience.

Xamarin 3 introduced , a framework for creating UI from code shared between platforms.

Xamarin 4 introduced a new SSH-based build host, to replace the old and buggy build host. The build host provides the connection between Visual Studio and the Mac in order to be able to build and deploy iOS applications.

Since June 2017 the Xamarin Platform supports libraries shifting and expanding the previous Portable Class Library (PCL). It enhances access to APIs within the .NET base class libraries and supports more platforms.

Resources

Books

Chat Rooms

50490 questions
52
votes
2 answers

Xamarin Forms StackLayout: How to set width / height of children to percentages

Is there a way to create a vertical stack layout with a button that takes 30% of of the parent, and a text input that takes 70% of the parent? Something like this:
sgarcia.dev
  • 5,671
  • 14
  • 46
  • 80
50
votes
10 answers

com.apple.AuthenticationServices.Authorization Error Code 1000

I receive the following error in DidCompleteWitherror: com.apple.AuthenticationServices.Authorization Error Code 1000 I'm using the following code to sign in to Apple var appleIdProvider = new ASAuthorizationAppleIdProvider(); var request =…
49
votes
4 answers

How do I use SharedPreferences in Xamarin.Android?

I want to save and retrieve some application settings in my Xamarin.Android project. I know that in Android (java), I use the class SharedPreferences to store this information, but I do not know how to convert that to Xamarin C#. When I type…
Richard Le Mesurier
  • 29,432
  • 22
  • 140
  • 255
48
votes
4 answers

.NET Standard, .NET Core, PCL

.NET Standard has been a confusing concept. The idea of a standard .NET library format sounds great. But, it's not clear what it is exactly. There are now .NET Core, and .NET Standard Class Library project templates in Visual Studio, as well as the…
Christian Findlay
  • 6,770
  • 5
  • 51
  • 103
48
votes
7 answers

Get current screen width in xamarin forms

I am creating one Xamarin Forms project and I got stuck in finding the current screen width according to the different device. I know how it can be done in android and ios but need a way to find the width in portable.
Tushar patel
  • 3,279
  • 3
  • 27
  • 30
48
votes
4 answers

How to create click event on label in xamarin forms dynamically

I am working on cross platform xamarin application and I want to create hyperlink label for "Forgot password?" on login page. I have used following code to create label but I don't know how to create onclick event on it. MainPage = new ContentPage …
Dipak
  • 1,199
  • 4
  • 21
  • 43
47
votes
1 answer

Adding a button to the title bar Xamarin Forms

Haven't been able to find quite the right answer for this yet. I want to add a button into the navigation / title bar at the top of a Xamarin Forms Navigation Page. Note that I need to know a method that will work on android, I'm not interested in…
Jobalisk
  • 728
  • 1
  • 6
  • 17
47
votes
11 answers

Warning major version 52 is newer than 51, the highest major version supported by this compiler

Basicly I'm super newbie and started internship in IT company. I installed VS with Xamarin. The problem that I'm facing is very frustrating. So even when i create empty project I can't compile it and get error like this : Severity Code Description…
T.Gelev
  • 499
  • 1
  • 4
  • 4
47
votes
3 answers

Whats the difference between Java.Net.Uri and Android.Net.Uri

I am trying to get a Uri from a file object like so: File file = new File("/sdcard/MyFolder/MyFile.txt"); var androidUri = Android.Net.Uri.FromFile(file).ToString(); var javaUri = file.ToURI().ToString(); this returns the following…
JKennedy
  • 18,150
  • 17
  • 114
  • 198
47
votes
9 answers

Android - Correct use of invalidateOptionsMenu()

I have been searching a lot on invalidateOptionsMenu() and I know what it does. But I cannot think of any real life example where this method could be useful. I mean, for instance, let's say we want to add a new MenuItem to our ActionBar, we can…
46
votes
7 answers

How to zipalign the apk file in Windows

I have signed and packaged the Xamarin application and so have created the apk file using Visual Studio. How can I zipalign this file in Windows?
Bengi Besçeli
  • 3,638
  • 12
  • 53
  • 87
46
votes
5 answers

Why the 20px gap at the top of my UIViewController?

The Problem Consider the following controller hierarchy: UINavigationController UIViewController UITableViewController The presence of the UIViewController is affecting layout. Without it, the UITableViewController takes up the entire bounds…
Kent Boogaart
  • 175,602
  • 35
  • 392
  • 393
46
votes
7 answers

How to log in to Facebook in Xamarin.Forms

I want to make a Xamarin.Forms project, targeting iOS, Android and Windows Phone. My app needs to authenticate users using Facebook. Should I implement login for each platform independently, or use a manual…
Morten Lyhr
  • 679
  • 1
  • 6
  • 8
46
votes
2 answers

Use a local database in Xamarin

I have started using the Xamarin plugin for Visual Studio to create an Android app. I have a local SQL database, and I want to call it to display data. I don't see how I can do this. Is it possible?
user2631662
  • 855
  • 5
  • 12
  • 21
46
votes
3 answers

How to speed up MonoTouch compilation time?

It is well known that If compiling takes even 15 seconds, programmers will get bored while the compiler runs and switch over to reading The Onion, which will suck them in and kill hours of productivity. Our MonoTouch app takes 40 seconds to…
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511