Recently I ran into an issue where code worked perfectly fine in Debug mode, but not in Release mode. It was on a Xamarin.Android project using MvvmCross and certain bindings did not work as expected in Release mode. Bonus points if you already know what the issue is :). For those of you who don’t, stay with me.

So, first thing you do is check out the Android Build options for the Debug and Release configurations and see what’s different between the two.

Continue reading

Sometimes I come across (small) tips and tricks, gotchas or gems while working on Xamarin projects, so I thought let’s put those in a Xamarin Tips and Tricks series. I’ll kick off the series with some info on UriImageSource.

As you probably know you can set the Source of an Image from several locations, i.e. File, Resource, Stream or Uri. The UriImageSource loads an image from a Uri and then caches the results.

Continue reading

In Part 1 we took care of all the prerequisites of preparing a clean Mac Mini as our Jenkins build server. Now we are ready to set up Jenkins and configure our jobs.

The Goal

It’s good to summarize what we want to accomplish here. I’m not going into the merits of a CI server and why you should have one. Just trust me, you need one. If you want to read on the basics, see this Xamarin guide.

We want to automate the BuildTestDeploy cycle for our Xamarin.iOS app, let’s call it MyProject from now on. It’s considered good practice to split up these tasks in separate jobs, both for maintainability and to limit job execution time. This way you can manage and track progress for each job separately. Separate jobs have its downsides too, but we will come to that. We are going to create 3 jobs:

  1. MyProject (Build)
  2. MyProject-testcloud (Test)
  3. MyProject-testflight (Deploy)

The MyProject job will trigger the jobs MyProject-testcloud and MyProject-testflight only when the build succeeds. This is what we call Downstream projects. Notice that we are deploying to TestFlight right after the build succeeds, we are not waiting for the Test Cloud tests to finish. This is because I want to deploy to TestFlight regardless of the Test Cloud results as TestFlight is used by our developers and manual testers.

Continue reading