James Montemagno
James Montemagno

Live, Love, Bike, and Code.

Tags


Twitter


James Montemagno

Plugins

Continuous Integration & Delivery for Xamarin & .NET Libraries with VSTS

I build a lot of .NET libraries that include simple .NET Standard libraries to fully cross-platform plugins for Xamarin and Windows that target up to 10 different platforms. When I got started building libraries and shipping them to NuGet I went down a simple path of just building everything locally on my machine and manually uploading them to NuGet. This worked great for a single library, but as soon as I took on a second... third... forth... and so on, things got out of hand and I knew I had t…

James MontemagnoJames Montemagno

Converting Xamarin Libraries to SDK Style & Multi-Targeted Projects

If you are like me you may have a lot of standard Xamarin.iOS and Xamarin.Android libraries sitting around. They aren't plugins, but they do extend a single platform with custom functionality and controls. Wouldn't it be great if you could update them to the new SDK Style projects which use Package References, auto-NuGet packaging, and load WAY faster?!?!? It is all crazy simple to do just like converting old PCLs to .NET Standard. If you are setting up CI this is going to be a huge time saver a…

James MontemagnoJames Montemagno

Monitoring Android Activity Lifecycle Events: Return of Current Activity Plugin

It has been nearly two and a half years since I wrote about how to easily get access to the current Android Activity with just a few lines of code. This code led to the creation of my Current Activity Plugin for Xamarin.Android apps and library creators to easily get access to the current Activity. Since then it has been the core of many of my plugins and has been installed over 600,000 times from NuGet! Times change and it is time for an update to this near perfect library. If you have ever use…

James MontemagnoJames Montemagno

Moving Plugins for Xamarin to .NET Standard

I could never imagine the amazing response to Plugins for Xamarin, those amazing little libraries that abstract away all that platform specific code into a lovely cross-platform API for iOS, Android, and Windows. They sure have grown, with hundreds of plugins being generated by the community and with tons of installs. My plugins alone have now hit 3 Million installations! With all this momentum it is a great time to look to the future, simplify plugins, and take the leap to .NET Standard. What i…

James MontemagnoJames Montemagno

Unit Testing Plugins for Xamarin

So you love unit testing…. said no one ever, but you are forced to write unit tests and you want to use Plugins for Xamarin which are all singletons and need platform specific implementations or they will throw an exception in your tests…. what to do?!?!? Plugins are all interface based, which means all we have to do is use standard practices to not directly call the singleton, and setup our code to return the instance we want. In unit tests we can return a Mock (or Moq) of the interface, and in…

James MontemagnoJames Montemagno

Opening App Store for Ratings on iOS and Android

Sometimes you want to ask your users to rate your application. There are several components out there that will open a dialog box and prompt for ratings, but sometimes you don’t want to stop the flow of your app and throw it in their face. What I do in my application is simply add a section on my settings page asking if they would like to rate the app. When pressed I launch the app store directly to the review page: This is pretty simple to do for iOS and Android by launching a specific UR…

James MontemagnoJames Montemagno

I crush code and share it, publish NuGet packages, speak at conferences, upload videos, pretend I am good at playing video games, micro blog, tweet up a storm, drink gallons of coffee, and ride my bike. Checkout my monthly newsletter that you should subscribe to!