SlideShare a Scribd company logo
1 of 12
UNLEASH THE POWER OF CODE REUSE
Creating Plugins For Xamarin
Yu Guan | Microsoft MVP
Meet Yu Guan | @askguanyu
twitter.com/askguanyu
linkedin.com/in/yuguan
askguanyu.wordpress.com
devlib.codeplex.com
Microsoft MVP
Speaker, Blogger, Hacker, Coder, Maker, Gamer
Azure, IoT, Cross-platform Apps, GIS, Services
WHAT IS A PLUGIN FOR XAMARIN?
 Abstract platform specific functionality API
 Small
 Cross-platform
 Minimal-to-no dependencies
 Accessed via PCL or Shared Projects
WALKTHROUGH
Get Visual Studio Extensions - Plugin For Xamarin Templates
Create Plugin For Xamarin Templates projects
Implement your plugin
Add nuspec file
Nuget pack
Test (optional)
Nuget push
Sync to GitHub (optional)
PLUGIN FOR XAMARIN TEMPLATES
 https://visualstudiogallery.msdn.microsoft.com/afead421-3fbf-489a-a4e8-
4a244ecdbb1e
CREATE PROJECTS
IMPLEMENT YOUR PLUGIN
/// <summary>
/// Interface for MyPlugin1
/// </summary>
public interface IMyPlugin1
{
bool IsConnected { get; set; }
void PlaySound();
string GetDeviceInfo();
}
/// <summary>
/// Implementation for MyPlugin1
/// </summary>
public class MyPlugin1Implementation : IMyPlugin1
{
public bool IsConnected
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public void PlaySound()
{
throw new NotImplementedException();
}
public string GetDeviceInfo()
{
throw new NotImplementedException();
}
}
ADD NUSPEC FILE
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8.3">
<id>Plugin.MyPlugin1</id>
<version>1.0.0</version>
<title>MyPlugin1 Plugin for Xamarin and Windows</title>
<authors>Your Name</authors>
<owners>Your Name</owners>
<licenseUrl/>
<projectUrl/>
<!--Default Icon, a template can be found: https://raw.githubusercontent.com/jamesmontemagno/Xamarin-Templates/master/Plugins-Templates/icons/pl
<iconUrl>https://raw.githubusercontent.com/jamesmontemagno/Xamarin-Templates/master/Plugins-Templates/icons/plugin_icon_nuget.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
Long description for your plugin.
</description>
<summary>Short description for your plugin.</summary>
<tags>xamarin, pcl, xam.pcl, plugin, plugin for xamarin, windows phone, winphone, wp8, winrt, android, xamarin.forms, ios</tags>
<dependencies>
<group targetFramework="net">
</group>
<group targetFramework="win">
</group>
<group targetFramework="wp">
</group>
<group targetFramework="wpa">
</group>
<group targetFramework="MonoAndroid">
</group>
<group targetFramework="Xamarin.iOS10">
</group>
<group targetFramework="Xamarin.Mac20">
</group>
<group targetFramework="portable-net45+win+wpa81+wp80">
</group>
<group targetFramework="uap">
</group>
<group targetFramework="dotnet">
PACKAGING AND PUBLISHING NUGET PACKAGE
 https://docs.nuget.org/Create/Creating-and-Publishing-a-Package
 nuget.exe update –self
 nuget.exe setApiKey “your key”
 nuget.exe pack YourPackage.nuspec
 nuget.exe push YourPackage.nupkg -Source https://www.nuget.org/api/v2/package
GitHub
TIME TO CODE
Thank You!

More Related Content

What's hot

Demo Pivotal Circle Of Code
Demo Pivotal Circle Of CodeDemo Pivotal Circle Of Code
Demo Pivotal Circle Of CodeGwenn Etourneau
 
Flutter Beta but Better and Better
Flutter Beta but Better and BetterFlutter Beta but Better and Better
Flutter Beta but Better and BetterDonghyeok Kang
 
Day: Web Development Goes Social
Day: Web Development Goes SocialDay: Web Development Goes Social
Day: Web Development Goes SocialDay Software
 
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCPKun-Neng Hung
 
Devnest 110802
Devnest 110802Devnest 110802
Devnest 110802Angus Fox
 
Getting started with package management - Azure DevOps
Getting started with package management - Azure DevOpsGetting started with package management - Azure DevOps
Getting started with package management - Azure DevOpsMuralidharan Deenathayalan
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends wayPrasanna Venkatesan
 
Heroku and Rails Applications
Heroku and Rails ApplicationsHeroku and Rails Applications
Heroku and Rails ApplicationsAndreas Sotnik
 
Integration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-TricksIntegration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-TricksBizTalk360
 
Developing Inside the Cloud
Developing Inside the CloudDeveloping Inside the Cloud
Developing Inside the CloudMichael Rees
 
Taking Mobile Development Serverless with C#
Taking Mobile Development Serverless with C#Taking Mobile Development Serverless with C#
Taking Mobile Development Serverless with C#James Montemagno
 
Java Web Apps and Services on Oracle Java Cloud Service
Java Web Apps and Services on Oracle Java Cloud ServiceJava Web Apps and Services on Oracle Java Cloud Service
Java Web Apps and Services on Oracle Java Cloud ServiceAndreas Koop
 
Deploying Apps Heroku
Deploying Apps HerokuDeploying Apps Heroku
Deploying Apps HerokuAjit N K
 
Serverless is the next logical Evolution in Cloud Native Software Development
Serverless is the next logical Evolution in Cloud Native Software DevelopmentServerless is the next logical Evolution in Cloud Native Software Development
Serverless is the next logical Evolution in Cloud Native Software DevelopmentQAware GmbH
 
Monitor Cloud Foundry and Bosh with Prometheus
Monitor Cloud Foundry and Bosh with PrometheusMonitor Cloud Foundry and Bosh with Prometheus
Monitor Cloud Foundry and Bosh with PrometheusGwenn Etourneau
 
Building a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformBuilding a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformAngus Fox
 
Die Evolution von Container Image Builds
Die Evolution von Container Image BuildsDie Evolution von Container Image Builds
Die Evolution von Container Image BuildsNico Meisenzahl
 
Introduction to BizTalk Server 2016 Feature Pack 2
Introduction to BizTalk Server 2016 Feature Pack 2Introduction to BizTalk Server 2016 Feature Pack 2
Introduction to BizTalk Server 2016 Feature Pack 2BizTalk360
 
Don't use create react app
Don't use create react appDon't use create react app
Don't use create react appNikhil Kumaran S
 

What's hot (20)

Demo Pivotal Circle Of Code
Demo Pivotal Circle Of CodeDemo Pivotal Circle Of Code
Demo Pivotal Circle Of Code
 
Flutter Beta but Better and Better
Flutter Beta but Better and BetterFlutter Beta but Better and Better
Flutter Beta but Better and Better
 
Day: Web Development Goes Social
Day: Web Development Goes SocialDay: Web Development Goes Social
Day: Web Development Goes Social
 
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
 
Devnest 110802
Devnest 110802Devnest 110802
Devnest 110802
 
Getting started with package management - Azure DevOps
Getting started with package management - Azure DevOpsGetting started with package management - Azure DevOps
Getting started with package management - Azure DevOps
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends wayBuilding applications in a Micro-frontends way
Building applications in a Micro-frontends way
 
From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020From Monolith to K8s - Spring One 2020
From Monolith to K8s - Spring One 2020
 
Heroku and Rails Applications
Heroku and Rails ApplicationsHeroku and Rails Applications
Heroku and Rails Applications
 
Integration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-TricksIntegration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-Tricks
 
Developing Inside the Cloud
Developing Inside the CloudDeveloping Inside the Cloud
Developing Inside the Cloud
 
Taking Mobile Development Serverless with C#
Taking Mobile Development Serverless with C#Taking Mobile Development Serverless with C#
Taking Mobile Development Serverless with C#
 
Java Web Apps and Services on Oracle Java Cloud Service
Java Web Apps and Services on Oracle Java Cloud ServiceJava Web Apps and Services on Oracle Java Cloud Service
Java Web Apps and Services on Oracle Java Cloud Service
 
Deploying Apps Heroku
Deploying Apps HerokuDeploying Apps Heroku
Deploying Apps Heroku
 
Serverless is the next logical Evolution in Cloud Native Software Development
Serverless is the next logical Evolution in Cloud Native Software DevelopmentServerless is the next logical Evolution in Cloud Native Software Development
Serverless is the next logical Evolution in Cloud Native Software Development
 
Monitor Cloud Foundry and Bosh with Prometheus
Monitor Cloud Foundry and Bosh with PrometheusMonitor Cloud Foundry and Bosh with Prometheus
Monitor Cloud Foundry and Bosh with Prometheus
 
Building a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformBuilding a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator Platform
 
Die Evolution von Container Image Builds
Die Evolution von Container Image BuildsDie Evolution von Container Image Builds
Die Evolution von Container Image Builds
 
Introduction to BizTalk Server 2016 Feature Pack 2
Introduction to BizTalk Server 2016 Feature Pack 2Introduction to BizTalk Server 2016 Feature Pack 2
Introduction to BizTalk Server 2016 Feature Pack 2
 
Don't use create react app
Don't use create react appDon't use create react app
Don't use create react app
 

Similar to Unleash the power of code reuse - creating plugins for Xamarin

Ordina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better togetherOrdina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better togetherOrdina Belgium
 
Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie
Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie
Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie Delta-N
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko3D
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker, Inc.
 
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugToshiaki Maki
 
ASP.NET Core deployment options
ASP.NET Core deployment optionsASP.NET Core deployment options
ASP.NET Core deployment optionsKen Cenerelli
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixIBM
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developersDaniel Krook
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Ajeet Singh Raina
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourBrian Culver
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXMark Rackley
 
Visual Studio 2017 - Montreal Launch Event
Visual Studio 2017  - Montreal Launch EventVisual Studio 2017  - Montreal Launch Event
Visual Studio 2017 - Montreal Launch EventGuy Barrette
 
Cut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsCut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsGR8Conf
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyTim Pettersen
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekDr. Felix Raab
 
Workshop: Modularization of .NET Applications
Workshop: Modularization of .NET ApplicationsWorkshop: Modularization of .NET Applications
Workshop: Modularization of .NET ApplicationsRainer Stropek
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesChakradhar Rao Jonagam
 

Similar to Unleash the power of code reuse - creating plugins for Xamarin (20)

Ordina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better togetherOrdina SOFTC Presentation - TFS and JAVA, better together
Ordina SOFTC Presentation - TFS and JAVA, better together
 
Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie
Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie
Ontwikkelstraat in de Cloud: ALM en Azure een krachtige combinatie
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
 
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the CloudWSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
WSO2Con US 2013 - Keynote: Developing Enterprise Apps In the Cloud
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsug
 
ASP.NET Core deployment options
ASP.NET Core deployment optionsASP.NET Core deployment options
ASP.NET Core deployment options
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFX
 
Visual Studio 2017 - Montreal Launch Event
Visual Studio 2017  - Montreal Launch EventVisual Studio 2017  - Montreal Launch Event
Visual Studio 2017 - Montreal Launch Event
 
Silverlight
SilverlightSilverlight
Silverlight
 
Cut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsCut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature plugins
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
Workshop: Modularization of .NET Applications
Workshop: Modularization of .NET ApplicationsWorkshop: Modularization of .NET Applications
Workshop: Modularization of .NET Applications
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
 

More from Yu GUAN

Canada Chinese Microsoft Tech Club Event 1
Canada Chinese Microsoft Tech Club Event 1Canada Chinese Microsoft Tech Club Event 1
Canada Chinese Microsoft Tech Club Event 1Yu GUAN
 
Asp netmvc e03
Asp netmvc e03Asp netmvc e03
Asp netmvc e03Yu GUAN
 
You can git
You can gitYou can git
You can gitYu GUAN
 
A Journey to Azure
A Journey to AzureA Journey to Azure
A Journey to AzureYu GUAN
 
Dream career dot NET
Dream career dot NETDream career dot NET
Dream career dot NETYu GUAN
 
Hosting your own NuGet private repository
Hosting your own NuGet private repositoryHosting your own NuGet private repository
Hosting your own NuGet private repositoryYu GUAN
 
Windows service best practice
Windows service best practiceWindows service best practice
Windows service best practiceYu GUAN
 
Wcf best practice
Wcf best practiceWcf best practice
Wcf best practiceYu GUAN
 
A Journey To Microsoft Azure E00 Azure 101
A Journey To Microsoft Azure E00 Azure 101A Journey To Microsoft Azure E00 Azure 101
A Journey To Microsoft Azure E00 Azure 101Yu GUAN
 
Welcome to power point
Welcome to power pointWelcome to power point
Welcome to power pointYu GUAN
 

More from Yu GUAN (10)

Canada Chinese Microsoft Tech Club Event 1
Canada Chinese Microsoft Tech Club Event 1Canada Chinese Microsoft Tech Club Event 1
Canada Chinese Microsoft Tech Club Event 1
 
Asp netmvc e03
Asp netmvc e03Asp netmvc e03
Asp netmvc e03
 
You can git
You can gitYou can git
You can git
 
A Journey to Azure
A Journey to AzureA Journey to Azure
A Journey to Azure
 
Dream career dot NET
Dream career dot NETDream career dot NET
Dream career dot NET
 
Hosting your own NuGet private repository
Hosting your own NuGet private repositoryHosting your own NuGet private repository
Hosting your own NuGet private repository
 
Windows service best practice
Windows service best practiceWindows service best practice
Windows service best practice
 
Wcf best practice
Wcf best practiceWcf best practice
Wcf best practice
 
A Journey To Microsoft Azure E00 Azure 101
A Journey To Microsoft Azure E00 Azure 101A Journey To Microsoft Azure E00 Azure 101
A Journey To Microsoft Azure E00 Azure 101
 
Welcome to power point
Welcome to power pointWelcome to power point
Welcome to power point
 

Recently uploaded

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 

Recently uploaded (20)

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 

Unleash the power of code reuse - creating plugins for Xamarin

  • 1. UNLEASH THE POWER OF CODE REUSE Creating Plugins For Xamarin Yu Guan | Microsoft MVP
  • 2. Meet Yu Guan | @askguanyu twitter.com/askguanyu linkedin.com/in/yuguan askguanyu.wordpress.com devlib.codeplex.com Microsoft MVP Speaker, Blogger, Hacker, Coder, Maker, Gamer Azure, IoT, Cross-platform Apps, GIS, Services
  • 3. WHAT IS A PLUGIN FOR XAMARIN?  Abstract platform specific functionality API  Small  Cross-platform  Minimal-to-no dependencies  Accessed via PCL or Shared Projects
  • 4. WALKTHROUGH Get Visual Studio Extensions - Plugin For Xamarin Templates Create Plugin For Xamarin Templates projects Implement your plugin Add nuspec file Nuget pack Test (optional) Nuget push Sync to GitHub (optional)
  • 5. PLUGIN FOR XAMARIN TEMPLATES  https://visualstudiogallery.msdn.microsoft.com/afead421-3fbf-489a-a4e8- 4a244ecdbb1e
  • 7. IMPLEMENT YOUR PLUGIN /// <summary> /// Interface for MyPlugin1 /// </summary> public interface IMyPlugin1 { bool IsConnected { get; set; } void PlaySound(); string GetDeviceInfo(); } /// <summary> /// Implementation for MyPlugin1 /// </summary> public class MyPlugin1Implementation : IMyPlugin1 { public bool IsConnected { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } } public void PlaySound() { throw new NotImplementedException(); } public string GetDeviceInfo() { throw new NotImplementedException(); } }
  • 8. ADD NUSPEC FILE <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.8.3"> <id>Plugin.MyPlugin1</id> <version>1.0.0</version> <title>MyPlugin1 Plugin for Xamarin and Windows</title> <authors>Your Name</authors> <owners>Your Name</owners> <licenseUrl/> <projectUrl/> <!--Default Icon, a template can be found: https://raw.githubusercontent.com/jamesmontemagno/Xamarin-Templates/master/Plugins-Templates/icons/pl <iconUrl>https://raw.githubusercontent.com/jamesmontemagno/Xamarin-Templates/master/Plugins-Templates/icons/plugin_icon_nuget.png</iconUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description> Long description for your plugin. </description> <summary>Short description for your plugin.</summary> <tags>xamarin, pcl, xam.pcl, plugin, plugin for xamarin, windows phone, winphone, wp8, winrt, android, xamarin.forms, ios</tags> <dependencies> <group targetFramework="net"> </group> <group targetFramework="win"> </group> <group targetFramework="wp"> </group> <group targetFramework="wpa"> </group> <group targetFramework="MonoAndroid"> </group> <group targetFramework="Xamarin.iOS10"> </group> <group targetFramework="Xamarin.Mac20"> </group> <group targetFramework="portable-net45+win+wpa81+wp80"> </group> <group targetFramework="uap"> </group> <group targetFramework="dotnet">
  • 9. PACKAGING AND PUBLISHING NUGET PACKAGE  https://docs.nuget.org/Create/Creating-and-Publishing-a-Package  nuget.exe update –self  nuget.exe setApiKey “your key”  nuget.exe pack YourPackage.nuspec  nuget.exe push YourPackage.nupkg -Source https://www.nuget.org/api/v2/package