Matt Hope
Posted on June 10, 2020
This year I decided to embark on the journey of developing a .Net Core style host builder for Xamarin. I had previously seen examples using the HostBuilder
provided by the .Net Core framework. While this approach was perfectly fine and works as intended, I found myself wanting something a little more integrated with Xamarin. Enter Hostly, a framework that provides end-users with a custom Ihost
tailored to Xamarin.Forms
. It's as simple as running a few lines of code in your entry class (FormsAppCompatActivity
in Android, or FormsApplicationDelegate
in iOS):
new XamarinHostBuilder().UseApplication<App>()
.UsePlatform(this)
.Build()
.StartAsync();
Using Hostly opens up access to a rich set of useful features when developing a Xamarin app. A few of those being:
- Navigation Middleware
- Lifecycle Middleware (In progress)
- Dependency Injection
- EF.Core
- Hosted services
Try it out for yourself here
Posted on June 10, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.