Xamarin Live Player is an incredibly useful tool for when you’re laying out your Xamarin Forms pages. The debug cycle for creating layouts is dramatically reduced when using the Live Player and I’ve personally been using it on my latest projects. During this time I’ve learned a couple of tips and tricks regarding this tool that I wanted to share.
File -> New…
Xamarin Live Player does not work well with a big project full of dependencies. As the documentation says, there are some limitations to it, although they are working on improving this (see James Montemagno’s comment on this post regarding SQLite). A workaround that I’ve been using is to create a new Xamarin Forms project without any dependencies or NuGet packages and use Live Player to create the pages that I want. When you’re done tweaking your margins and sizes, you can copy the layout back to your main project.
Provisioning? No thanks.
The Live Player is a bit of a hassle to use with iOS. Usually you’ll have to set up a certificate and a provisioning profile just to be able to debug the app on an iOS device, and if you just want to iterate on your page layout that seems a bit excessive. Luckily that has changed with the recent release of version 15.6 of Visual Studio 2017. You are now able to use the Live Player with the Remote iOS simulator. This is great as it reduces the friction involved with getting started with the Live Player for iOS. This functionality already exists for Android, but if you have limitations that prevent you from using the emulator (e.g. you need Hyper-V on) or don’t own an Android device this is a great substitute.
If you have any other tips or tricks regarding using the Live Player, feel free to leave a comment.