I recommend anyone in Scotland (or more specifically, anyone likely to get a COVID-19 test administered by NHS Scotland) with a compatible device to download and install it.
Microsoft have just announced the future of Xamarin and Xamarin forms - the .NET Multi-platform App UI (or MAUI for short). As a name, it’s not great. The highlights are as follows:
- It’s an evolution of Xamarin Forms. It basically is Xamarin Forms, but finally accepting some breaking changes. To be honest, I’m hoping for a lot since there is a lot of weirdness in Xamarin Forms that has been holding it back.
- Single project, multi-targeted. It took a long time to get to the point where this was possible. From shared projects, to PCL projects, through .NET Standard. This should make things a lot easier.
- Still based on platform renderers using native controls. This is a mixed bag. Using native controls has long been a selling point of Xamarin (with or without Forms). With the rise of Flutter this has been shown to be less important. Many people have been asking for consistent platform agnostic renderers instead.
- The end of “Xamarin” as a name. Some time in the .NET 6 timeline (end of 2021) Xamarin.iOS will become .NET for iOS and Xamarin.Android will be .NET for Android. I have mixed feeling about this since this was a fairly succinct way to describe by top skillset.
I also already have my own enhancement issue submitted.
Since becoming open source, it has become possible to find out potential upcoming features in Xamarin Forms by just poking around the active branches in the repository (macOS support was visible in the repo before any announcement). One of them is lv2spike. From just reading the commit messages, it seems this is a new CollectionView, based on UICollectionView for iOS and RecyclerView for Android. This is something that has been needed for a while, but is a big enough undertaking that I understand why it has taken a while. After all the branch suggests this is still just a spike. There are quite a lot of feature requests for the Xamarin Forms ListView that are just not possible (like this one for horizontal layout) mainly because the iOS implementation is based on UITableView. This will open lots of possibilities. My biggest concern is that despite the push forward with features, Xamarin Forms is accruing bugs even faster, and with the expanded platform support this could just get worse…
For various reasons I decided to write a Tic Tac Toe game in Xamarin Forms. At the moment it supports variable board sizes, variable win line size (so it implicitly supports Gomoku) and a few custom rules like misère, a pie rule and disallowed overlines.
It currently functions on Android, iOS and Windows, but is only released on Android for now. Apart from experimenting with various features of Xamarin Forms (as well as managing Nuget packages), my goal is to try and add all the options. Features I’m planning:
- Ultimate Tic-tac-toe
- Quantum Tic-tac-toe
- 3D (and 4D) Tic-tac-toe
- Online multiplayer
- Order and chaos
- Wild Tic-tac-toe
Download Tic-tac-toe Collection from the Google Play Store.
TLDR: When setting the Triggers property in XAML, use the actual type of the parent tag, not a supertype. After recently updating Xamarin Forms from
220.127.116.11, I started getting an
InvalidOperationException: The BindableProperty "Triggers is readonly" inside
InitializeComponent. Unlike many problems, this was quite easy to track down.
InitializeComponent errors are generally XAML, and in the page in question there was a single
Trigger. In this case the solution was simple. The
Trigger was on a custom Button type, but I was setting it specifically using
Button.Triggers. Changing it to be the actual type fixed it. So, I changed it from```
<DataTrigger … />
TLDR: An error containing “–no-version-vectors” is probably fixed by updating your Android SDK Build Tools to at least 23.
I recently upgraded a project to the latest version of Xamarin Forms and got the following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 2. Output: ERROR: Unknown option '--no-version-vectors'
$ grep -ri "no-version" . on the project revealed it was being used in a dependency brought in by the Forms update:
Long story short, this parameter is for the
aapt tool in the Android SDK Build Tools from at least version 23. Updating through the Android SDK manager fixed it.
Betrayal at House on the Hill is a board game published by Avalon Hill and designed by Bruce Glassco. The game is split into two parts. In the first, the players become trapped in a haunted house which they must explore, revealing rooms as they do. At some point the second part, the “haunt”, begins in which one player (generally) becomes a traitor and everyone plays out one of 50 scenarios pitting the traitor against the others.
An important part of the game involves tracking each of the player’s attributes (each character has a different range of possible values for each attribute). Since the included cardboard trackers can be loose and tend to slip out of place, a few different smartphone apps have appeared to help the situation.
The earliest Android version is Betrayal Character Cards. This app does the bare minimum needed. You can see a list of characters, see their attribute ranges and select the current value for each. As a small extra it also includes the birthday and hobbies of each character (which has a minor gameplay purpose).
Out of the apps available this is the simplest and has the least features. On the other hand this should run on the widest range of devices.