Xamarin: Cross-Platform Mobile Application Development
by Jonathan Peppers, George Taskos, Can Bilgin
Creating cross-platform plugins
Okay, you're tired of repeating the same copy and paste code in every project you create for this native implementation that there is no available plugin from Xamarin or a Xamarin developer out there! You create your interface, create the implementation classes, register to a DI container or just a service locator, and resolve the dependencies in runtime. It works!
Now, for a minute imagine creating your own plugin. If the client remembers to register your plugin with your implementation for each platform then everything's OK, and you will be depended in a custom internal or third-party service locator and DI container? Doesn't sound very practical, right?
Yes, there is a better way to do things. A good friend named ...
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