If you ever encountered the error AAPT: Unknown option '--no-version-vectors' during the Xamarin build you probably found this page looking for a solution. Like I did. Then you probably first tried setting AndroidSdkBuildToolsVersion to the latest you have. Just like me. Or uninstall all the older versions. If this didn’t work (like in my case) stay with me.

→ Read more

If you are using Azure Active Directory services you probably at least considered using ADAL as a client library in you application. It’s easy to setup, use and it offers a unified API across the most popular platforms - iOS, Android, UWP, web - both .Net and native. Unfortunately sometimes things just does not work out of the box without deeper understanding how some features are implemented. This post is about one of them - credentials cache persistency on iOS.

→ Read more

Working on a bug fix in MVVMCross-based mobile application I noticed a strange behavior. The navigation to other view model I put in async Init<TInit>(TInit parameters) which as executed on the first view model in my app was running twice. After a short debugging session it turned out that MvxViewModel<TInit> Init() is called from the view controllers ViewDidLoad() method. Obviously there was something I was missing in terms of ViewDidLoad() semantics.

→ Read more

Considering Xamarin there can be many reasons for need of screen resolution detection in mobile app. You may have more complex logic of loading your resources possibly split between PCL and Android/iOS projects. Other might want to send this information with REST request for reporting. Whatever your reason is, here is a very short text on how to do it in IoC-friendly way.

→ Read more

Working with mobile can be quite challenging for a developer with a web dev background. At least that is my experience so far. Comparing to typical HTML web elements with CSS styling some features might be missing.

An example for this kind of issues I faced recently is lack explicit padding for UILabel (and not only). You can either let the label to fit tightly around the text content or set the label’s size (either statically or with auto-sizing).

There are few solutions for this around the Internet (like this or this). Most of them are implemented in Swift/Obj-C, some are somehow incomplete even if provided with Xamarin code. Here is a short compilation of my findings.

→ Read more