C# 8 and .NET Core 3 Projects Using Azure - Second Edition
by Paul Michaels, Dirk Strauss, Jas Rademeyer
Xamarin plugins
The principle behind Xamarin is that the code that you write is cross-compiled. That is, when you compile for Android, you end up with a native app targeting the Android platform, and when you compile for iOS, you end up with a native app targeting iOS. However, the Xamarin platform is unable to do this when a piece of code is platform-specific. Say, for example, I want to access the camera – this varies from platform to platform. You can't simply take the code that does this for an iPhone and compile it for Android. So, how do we create platform-specific code?
The answer is that each piece of platform-specific code needs to be created separately for each platform; the principle behind Xamarin Forms is that you call the method ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access