![]() Implementation PCL: Plugin.Functionality.I prefer to name the solution after the functionality I am exposing and follow this naming scheme: Our plugin will start with a simple interface inside of a PCL describing the functionality we would like to expose. Recently, I wanted to have a way to somehow vibrate the phone from shared code, so let’s see how to build and share this functionality. ![]() That is how my cross-platform settings plugin was born and published to NuGet. A while back, I ran into the issue of having a common API to save settings across all platforms from shared code. Usually an idea for a plugin comes directly from developing an application. Today, I want to show you how easy it is to create your own reusable plugin for Xamarin and Xamarin.Forms. However, what happens once you write this code and want to share it between other apps you are building or with developers all over the world? Using the power of portable class libraries (PCL), and NuGet, sharing this code is also straightforward. Using Xamarin.Form’s built-in dependency service, it is extremely easy to get access to the native platform to expose rich functionality unique to the underlying platform. Xamarin.Forms enables you to share not only your app’s business logic, but also a shared user interface across iOS, Android, and Windows Phone mobile apps.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |