James Montemagno
James Montemagno

Live, Love, Bike, and Code.

Tags


James Montemagno

Xamarin

Building, testing, & shipping My Cadence for iOS in less than a week

My holiday hacking came early this year when I decided to build my own DIY spin bike. Soon, after a few rides, my mind started to swirl with app ideas of how to improve my ride. Then when Apple released Apple Fitness+ without support for displaying cadence information from sensors I knew I had to build an app. That app is My Cadence, which connects to a small cadence sensor and displays the current cadence. It is actually packed full of awesome features including custom themes, in-app purchases,…

James Montemagno James Montemagno

5 Must Install NuGet Packages for New Xamarin Projects

Starting your first project can be a bit overwhelming. I mean heck, I wrote nearly 3,000 words breaking down every bit of what to select and what each option means. Oh, and I also have a full video series walking you through it step by step on my YouTube channel. Before I start writing code in my projects I take some time to configure my projects and then install essential NuGet packages that help me be super productive from the start. Yes, it is true that Xamarin.Forms and Xamarin.Essentials ar…

James Montemagno James Montemagno

Build Your First for iOS & Android App with Xamarin and Visual Studio

Let's start our journey together to build beautiful native cross-platform apps with .NET, Xamarin, and Visual Studio! In this blog I am going to guide you through the entire process and describe everything that is in File -> New for Xamarin. If you are a more visual learner, I have a full video that you can watch: Let's set some groundwork first by answering some frequent questions. What is .NET? .NET is a cross-platform, high-performant, and open-source runtime that is used with multiple…

James Montemagno James Montemagno

Enabling C# 9 in Xamarin & .NET Standard Projects

Whoa! .NET 5 is out and C# 9 is out! This means you are ready to use records, new pattern matching, and more! But wait a second... your apps haven't been upgraded to .NET 5 yet or are a project type that don't support .NET  so you don't have access to the new C# 9 features :( Or do you!?!?!?! Yes, of course you do! Most new features in C# are compiler based and not necessarily runtime based.  When you create a new project the compiler determines a default C# language based on these rules: Targe…

James Montemagno James Montemagno

Shrink Your Android App Size with One Setting

When you are developing Android apps your app size can grow really fast.  We can get so caught up in the day to day that we forget how important it is to keep down the app size of our app. It may not seem like a 20MB APK is that much, but when you have limited internet or reception it can be a real pain. As an Android developer you have to develop for multiple ABIs, add a ton of resources and translations, and of course you have you have all of your source code and dependencies. You may have a…

James Montemagno James Montemagno

Setting Android Status Bar Background & Icon Colors

Over the past few months, I have been attempting to figure out the best ways to implement a light theme and dark theme in my Hanselman.Forms app. Working closely with my friend Kym Phillpotts we came up with a very nice theme changer for Xamarin.Forms, that allowed us to change all of the colors dynamically. The result is a very nice looking application that allows the users to pick their theme or use system defaults. One thing that bugged me in the original implementation for Android, was th…

James Montemagno James Montemagno

Investing Time in the Xamarin Linker for Smaller App Sizes

When developing an app, 99% of our time goes into writing the code, testing the functionality, and making small UI tweaks to please our end users. Most of this is done in debug mode which optimizes compilation and app size for speed, which makes sense. When we flip that flag to Release with the default settings, we often pay very little attention as to what is happening to our app. We get a nice APK or IPA and ship it up to the app store and we are done. However, if we just spent a little time f…

James Montemagno James Montemagno

Azure DevOps Settings for Xamarin iOS 13 and Android 10 Apps

Settings up continuous integration can be tricky when there are new versions coming out. Recently Visual Studio 2019 updated to support Xcode 11, iOS 13, Android 10, .NET Core 3, and C# 8. What a whirlwind of new updates that CI servers got all around the same time! This means that as you were updating your apps your hosted machines also got updated and probably broke your builds :(. My good friend Jonathan Peppers wrote an amazing tool called Boots that allows you to manually install dependenci…

James Montemagno James Montemagno

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