Disclaimer: this is an automatic aggregator which pulls feeds and comments from many blogs of contributors that have contributed to the Mono project. The contents of these blog entries do not necessarily reflect Xamarin's position.

September 16

Xamarin Evolve 2014 Speaker Spotlight: Paul Betts

This is the fifth post in our Xamarin Evolve 2014 “Speaker Spotlight” series, helping you get to know a little bit more about some of the amazing speakers who will be contributing at this year’s conference.

Photo of Paul BettsPaul Betts is a C# Hacker at GitHub, and the author of several open source .NET projects, including Refit, Splat! and Akavache. Paul graduated from The Ohio State University, and likes to spend his spare time hacking on open source software, playing guitar and bass, and in general is within ε of really awesome.

How long have you been doing mobile development?

My interest in mobile development started when iPhone first released their non-web SDK, but I really got started in mobile development when I added Xamarin support to ReactiveUI, which was about two years ago.

What are your favorite mobile apps and why?

My favorite app these days is Dropbox’s Mailbox. The usability designers who created that app are absolutely brilliant; while I don’t find it to be a particularly visually beautiful application (so much white everywhere!), using it is an absolute joy. If you’re building any kind of content-management/TODO app, study this thing like a graduate student.

What is your favorite platform to develop for and why?



What devices are you carrying around with you right now?

The devices I carry around with me are usually:

  • An HTC One (M7) – It’s getting a little long in the tooth, but getting the Developer Edition meant that it was super hackable and easy to flash with the latest software, given a bit of adb and fastboot work. It’s a great device except for the camera.
  • LG G Watch – I couldn’t wait until the Moto 360 came out – I’m excited to see if I can come up with a cool watch app!
  • nVidia Shield – It’s an Android phone with a super-powered graphics chip and an HDMI out, bolted to a game controller. I use it to play old SNES games and write software for it.

What are your favorite open source libraries, and why?

My favorite libraries? The Xamarin ones I write, of course! I’ve got a lot of them:

The common theme around most of these libraries is that they let you write cross-platform code in a Portable Library, and the library handles the platform details. For example, ModernHttpClient brings the best platform-specific networking libraries to your app, but wraps them in a familiar HttpClient interface that works everywhere.

Separate from that, I love all of the great work that Jake Wharton does; he’s a great Android developer and a lot of my library ideas come from him.

What is your favorite line of code that you have ever written?

My favorite line of code I’ve ever written is here.

To explain it though, I need to back up. The goal of this class is to provide a mapped operation queue – i.e. you schedule a Task with a specific Key – Tasks with different keys run in parallel, and Tasks with the same key run sequentially.

The entire behavior of this class, this complex notion that would take pages and pages of buggy, unverifiable threading/locking code, is reduced to a single (relatively) beautiful statement in C# with Rx. What’s even cooler, is that the notion of scheduling priority (i.e. important operations should go to the head of the line), was added simply by changing a data structure, from using a normal Queue in a SemaphoreSubject, to using a PriorityQueue.

If you missed the earlier posts in this series, click through to read about Jesse Liberty, Jon Skeet, Jonathan Peppers, and Laurent Bugnion.

Getting Started as a Contributor to our Open-Source Projects

Unity and Open-Source

Last month at Unite, we announced our Open-Source initiative, where we will be opening the source to various components of Unity (along with other helpful tools and samples) in the future.  We announced the presence of the Unity Test Tools project at our new home on BitBucket and since then we’ve watched as our community has cloned, made forks, and submitted pull requests (you can see the development of the Test Tools happening in the repository itself and the project’s issue tracker being used as well).  Since then we’ve released our Xcode Manipulation API (allowing you to modify and adjust a generated Xcode project) and iOS Native Code samples (giving examples for things like how to integrate Unity with native UI and how to do native video rendering).  We’re also gearing up to ship you the source for our new UI shipping in 4.6 (which is currently in open beta) and we’re making plans to open the source to other components as well.

We also announced our Contributor’s Guide that is now part of our user manual.  Today, I’d like to go through those steps with you.

The Steps to Contributing

Our repositories are hosted on BitBucket under either Mercurial or Git.  If you’ve already contributed to a project on GitHub, the process is the same here.  If you’re coming from Perforce or SVN (or some other centralized version control system) and these concepts of ‘forks’ and ‘clones’ and ‘pushing’ and ‘pulling’ are all new to you, we encourage you to follow the steps in the contributor’s guide very closely (since they will guide you along with screenshots every step of the way) and also take advantage of the ‘Further Reading‘ section.

The first thing you need to do is get an account on BitBucket, which is where we are hosting our repositories.  This is a very straightforward process (f you’re completely new to BitBucket, but have a GitHub account, feel free to use that same account over at BitBucket, (EDIT: You need to create a BitBucket account first and connect your GitHub (or Google) account to it.  From then on, you will be able to login to BitBucket with your GitHub (or Google) account) and if you’re wondering why we are on BitBucket instead of GitHub, please see our FAQ.).

Next, you’ll want to make your way over to our home on BitBucket and find the repository you want to contribute to.  Once you’ve done that, you’ll want to fork the repository to your own space.  A fork of a a repository is simply a clone of a repository, that lives under your own space where you are free to push your own changes to.

Clone your fork and apply your changes.  Unless you love getting down and dirty on the command-line, we recommend SourceTree from Atlassian for interacting with both Mercurial and Git.  It will work for you whether you are on Mac or Windows, and whether you are using Mercurial or Git.

Finally, open a pull request from your fork and wait.  A Unity Developer will look at your pull request and process it, and if it’s approved, it will be merged into our repository.

In the end, the process looks like this:
DVCS Overview

What Happens to Pull Requests

When you submit a pull request, generally one of four things can happen:

  1. The pull request is accepted as-is and is merged in its entirety.
  2. The pull request is closed as rejected.
  3. The pull request is not closed as rejected, but the Unity Developer will require that you do some extra work before the change can be merged.
  4. The pull request is rejected, but the Unity Developer still applies some of the changes from the pull request.

Cases 1 and 2 are straightforward.  Case 3 usually means you need to do some cleanup or handle some extra cases.  Case 4 will usually happen if the Unity Developer doesn’t think all of the changes apply, but wants to take some of them, or if the history of the changes needs to be cleaned up before they can be applied.  In our Unity Test Tools project, we’ve already seen cases of 1, 2, and 4.

In all cases, you’ll be notified of activity on your pull request by mail, so be sure you are set up to receive email notifications from BitBucket.

There You Have It

So, in just a few relatively simple and straightforward steps, you can be helping to improve Unity and its ecosystem, both for yourself and the rest of the community!  As I’ve said before, we’re excited to see what you create.

September 15

Web Series: Better Know a Xamarin

You may have met a Xamarin or two at Evolve, developer group, or at one of our other awesome events. However, there are many Xamarins working hard behind the scenes and out in the field around the world to bring you this amazing development platform. Better Know a Xamarin is a new web series that you can find on our YouTube Channel, where we sit down with our fellow Xamarins to see what they do here at Xamarin and what their passions are.


To kick things off, we have four episodes for your enjoyment. So sit back and get ready to Better Know a Xamarin.

Morgan Forsythe - Marketing Operations Manager

Jon Goldberger – Customer Support Engineer

Aaron Bockover - Mac Team Lead

Alex Soto - Software Engineer (Components)

The web series will continue to roll out new videos each week, so be sure to follow our Twitter account or subscribe to our YouTube channel for updates. If you’re interested in joining our growing global team, check out our available positions here.

Want to better know a Xamarin in person? Meet us in Atlanta, Georgia for Xamarin Evolve, October 6th-10th. Register for your ticket to mobile expertise here.

Improved checkin progress

We’ve improved the way in which the checkin progress is handled in the GUI so that it shows more details when the data is transferred through a slow network.

The default checkin scale uses megabytes, but if the network is too slow (sometimes checking in data through the VPN) it is equivalent to not having progress at all.

What we’ve done is to add a secondary progress bar that shows up only when the transfer is too slow. The secondary bar shows the progress of each 4Mb block being transferred. Remember Plastic splits the checkins in 4Mb chunks. The chunks can be just parts of a large file or groups of small files.

The following screencast shows how it works on a network with changing speed (we use WAMEm to modify the network bandwidth and hence overall speed). The example is not realistic but it is helpful to explain the new feature:


The improved checkin progress has been available for a while, since:

  • - Jun 18th 2014
  • - May 19th 2014

September 13

SyncView revisited – improved performance

We’ve improved the performance and usability of the SyncView: it is now able to exclude branches making the sync process much faster.

As you know, the SyncView is the view in the GUI that you can use to preview what needs to be replicated between different servers and then run the replicas.

Excluded branches have been added to improve sync performance

We have added “excluded branches”: branches that you don’t want to sync between your repo and the remote one.

In my case I run a Plastic server on my laptop (using a SQLite backend handling about 18Gb) but I don’t have full replicas of the central repositories. I just pull the branches I need (to develop, code review or manually test tasks before getting them released). It means there are a few thousand branches on the remote server that I’ll never pull. Some of them are already years old.

Since the SyncView calculates all the changesets that need to be pushed or pulled in order to let you preview them, it started to get slow with thousands of branches.

That’s why we added the “excluded branches” feature.

You can select the branches you won’t be syncing and just “exclude them”. The result is that the sync view will be much, much faster, saving precious time on each loop.

We also added an option to show the “excluded branches” so that you can include them again in the calculation in case you need them later on (expanding the excluded branches is way much faster in 5.4 than in 5.0 since we implemented a new server API call in 5.4 to speed up the calculation, while 5.0 API is frozen and can’t take advantage of it).

New behavior in the “refresh” button

Previously the refresh button in the “sync view details” lower panel just affected the expanded repositories. While it wasn’t an issue when you worked with small lists, it wasn’t effective dealing whith long lists like this:

So from now on the “refresh” will trigger the calculation of the entire list of syncs instead of just the expanded ones, while you can still refresh them individually using the context menu.

New “push visible” and “pull visible” buttons

Especially when you’re using Xlinks it is very useful to use the filter to push (or pull) all the branches with a given name, in different repositories.

We’ve added two new buttons: “push visible” and “pull visible” to launch the pull or push of all the branches selected by the filter.

Underlying format change

All the SyncView configuration is stored on a file named syncviews.conf. We’ve modified the file format to make it human readable and better structured than it was before. It will be automatically upgraded by the new 5.0 and 5.4 releases so no user action is required.


This feature has been available since:

  • (August 6th 2014) and later.
  • (Aug 8th 2014) and later.

September 12

Webinar Recording: Get Ready for iOS 8

On September 17th, iOS 8 will launch with over 4,000 new APIs, making it one of the largest iOS releases ever. Xamarin developers can start building for iOS 8 now, with support currently in the alpha channel for App Extensions, TouchID Authentication, PhotoKit, HealthKit, HomeKit, Apple Pay, and more.

In this webinar, Xamarin Developer Evangelist Mike Bluestein provides an overview of the top new and updated APIs, and how to incorporate all of the great new features into your app.

Download the slides for the Get Ready for iOS 8 Webinar here.

Additional Resources

To ensure you get the most out of the exciting changes in iOS 8 using Xamarin and C#, we’ve created an extensive set of resources to help you get started that are outlined in this blog post.

If you’re already registered for Xamarin University, we’ll be debuting a new class on September 17, 2014, that will help you update your apps for iOS 8. If you’re not already registered for Xamarin University, you can learn more about our unlimited, live mobile app development training here.

Lastly, if you are coming to Xamarin Evolve 2014, we will be covering iOS extensively, including iOS 8. If you are not already attending the conference, you can register here.

September 11

Xamarin Evolve 2014 Speaker Spotlight: Laurent Bugnion

This is the fourth post in our Xamarin Evolve 2014 “Speaker Spotlight” series, helping you get to know a little bit more about some of the amazing speakers who will be contributing at this year’s conference.

Photo of Laurent BugnionToday we’re getting to know Laurent Bugnion, the Senior Director of IdentityMine in Zurich, Switzerland. This year will mark his 8th year as a Microsoft Client Development MVP and his second year as a Microsoft Regional Director. He is also the author of the well-known open-source framework MVVMLight for Windows Phone, Windows 8, WPF, and Silverlight. In his free time, Laurent writes for MSDN Magazine and various other publications, as well as on GalaSoft, his blog. Be sure to see Laurent at Xamarin Evolve giving the talk, “Building Cross-Platform Applications with Xamarin, Xamarin.Forms and MVVM Light.”

Why did you get into software development?

I was an electric engineer and started doing low level coding for embedded controllers twenty years ago.


How long have you been doing mobile development?

I started doing programming about 20 years ago and worked on all kind of systems, from embedded controllers to full blown PCs. I am still coding for multiple systems and mobile is, of course, an important part of it. I did some code for the Palm line of devices, but it was more of a hobby. I really started coding professionally for mobile devices when Microsoft released the first Windows Phones.

What is your favorite platform to develop for and why?

After working on many different platforms, I would say that my favorite remains the various XAML/C#. I am able to create UI in XAML that I cannot easily create with other platforms, and XAML/C# is available for many devices, from TVs (XBOX) and phones to computers and tablets. Also the tooling (especially Blend) is just fantastic, especially when you work closely with designers (which I do). Of course, on Android and iOS without XAML, working with C# is nice, too, but I do find the UI on these platforms quite complicated to build for compared to the simple beauty of XAML.

What devices are you carrying around with you right now?

I carry the Nokia Lumia 1020, which is my most trusted companion, all the time. I love this device, especially the amazing pictures it takes, and the large screen.

I also usually carry my Kindle Paperwhite. I love to read and the reading comfort is just fantastic on this device, though I also read on my Lumia when I don’t have my Kindle with me.

I recently fell in love with a Dell Venue Pro 8, on which I installed Windows Pro 8.1. It’s an awesome little device where I can run any Windows application, including legacy ones, and has great battery life.

Finally most of my work is done on my Surface, and I cannot wait to get my new Surface Pro 3 at the end of August!!

What are your favorite mobile apps and why?

I love geolocation, and it still feels somehow magical when an app knows where I am. This can be a huge help, especially when traveling. Also, anything related to photography.

What will attendees get out of your talk?

Users of MVVM Light on Microsoft platforms love it because it isn’t overly complicated and “does the job”. Now, with the possibility to use MVVM Light on Xamarin, too, I want to build a knowledge base for new users. Some of them have never heard of MVVM, some of them know of it but have heard contradictory statements. There is a need for information, and this will help people to switch platforms more easily, as well.

If you missed the earlier posts in this series, click through to read about Jesse LibertyJon Skeet, and Jonathan Peppers.

Android L and So Much More Webinar

The Android L Developer Preview introduced a plethora of new APIs for developers to take advantage of, including Material Design, notifications, and new animations, to name a few. l-dev-prevXamarin developers can already access these new APIs right now with our recently announced preliminary support in Xamarin.Android. With Google expected to release Android L fully this fall, it will be increasingly important to take advantage of these new APIs and get your app up-to-date.

Join Developer Evangelist James Montemagno on Tuesday, September 16th at 8am PDT to walk through the top new and updated APIs in the release. In addition, to everything new in the Android L Developer Preview, he will also cover everything new in the Google Play Services, Support Libraries, Android Wear, and Android TV SDKs.

Register Now

September 10

iOS 8 Bigger and Better with Xamarin

We are excited to announce that we have just released our support for all of the new APIs introduced in iOS 8.

We have added support for the just-announced Apple Pay API, so developers can integrate this new payment system into their iOS apps, continuing our streak ofios8-icon shipping same day support for iOS since iOS 5 and enabling developers to add the latest features to their iOS apps immediately.

This release is the perfect companion to the iOS 8 GM developer release so you can start submitting apps to the App Store that take advantage of the new iOS 8 APIs.

To ensure you get the most out of these exciting changes in iOS 8 using Xamarin and C#, we’ve created an extensive set of resources to help you get started:

iOS 8 Samples

First off we have plenty of new iOS 8 samples that provide examples of using updated iOS features in Xamarin and C#

App Extensions

app-extensions-iconExtensions allow applications to deliver functionality throughout the system. Applications can now offer such things as today widgets that live on the notification screen, custom keyboards and sharing extensions to name just a few of the new ways to reach beyond the application itself.

TouchID Authentication

touch-id-iconTouchID allows applications to tap into the authentication capability of Apple’s biometric touch sensor.


photokit-iconPhoto Kit is a new framework that allows applications to query the system image library and create custom user interfaces to view and modify its contents.  For an example of using the PhotoKit framework in Xamarin, see Mike Bluestein’s Build Great Photo Experiences in iOS 8 with Photokit blog post.

Manual Camera Controls


The AVFoundation Framework has been enhanced to offer many features that developers can use to deliver professional camera applications, including the ability to control the camera at a low level, with direct access to such things as exposure and focus.


healthkit-iconHealthKit provides system-wide health API that applications can use to store and query a vast amount of health data provided by other apps and accessories.


homekit-iconHomeKit is a home automation API that allows iOS applications to control devices within the home. It brings home automation capabilities to third party applications, extending the reach of such functionality beyond the device makers themselves.


cloudkit-iconCloudKit allows applications to deliver server-based authentication and storage all from a client side API that is available out of the box to iOS 8 users.

Document Picker

document-picker-iconThe document picker provides a mechanism for applications to access documents beyond the applications sandbox in a consistent manner.


handoff-iconHandoff allows applications to deliver seamless experiences between OS X and iOS, letting users pick up in an application on one platform right from where they left off on the other platform.

Unified Storyboards

unified-storyboards-iconUnified Storyboards allow a common design-time experience to create user interfaces that works across a variety iOS devices and screen sizes.


scenekit-iconSceneKit is a 3D scene graph API that makes integrating 3D content into your application and causal 3D games a breeze. For an example of using the SceneKit framework in Xamarin, see Mike Bluestein’s Lights, Camera, Action – 3D in iOS 8 with Scene Kit blog post.


spritekit-iconSprite Kit, the 2D game framework from Apple, has some interesting new features in iOS 8 and OS X Yosemite, including integration with Scene Kit, lighting  and physics enhancements.. For an example of using the SpriteKit framework in Xamarin, see Mike Bluestein’s New Sprite Kit Physics Features in iOS 8 blog post.

Installing Xamarin.iOS for iOS 8

Windows users with Visual Studio, in addition should:

  • Switch Visual Studio Xamarin Updater Channel to “Beta”.
  • Install the Visual Studio extension update.

You can browse our entire API change log and release notes to find out the latest features released today with Xamarin.iOS 8.0 and the new iOS 8 APIs.

Get Ready for iOS 8 Webinar

Xamarin Developer Evangelist Mike Bluestein will provide an overview of the top new and updated APIs it includes. Join us Thursday, September 11th at 8 am PT for this webinar to learn about incorporating all of the great new features into your app.

Register for Get Ready for iOS 8

September 9

Get Ready for iOS 8 with Xamarin Webinar

iOS 8 iconOn September 17th, iOS 8 will launch with over 4,000 new APIs, making it one of the largest iOS releases ever. Xamarin developers are already able to take advantage of our iOS 8 support, currently in the alpha channel, to start developing with App Extensions, TouchID Authentication, PhotoKit, HealthKit, HomeKit, and so much more.

Join our webinar with Xamarin Developer Evangelist Mike Bluestein this Thursday, September 11th, at 8 AM PDT for an overview of the top new and updated APIs, and how to incorporate all of the great new features into your app.

View the recording of this webinar here.

Unite 2014 Wrap Up

Another Unite has come and gone and it was amazing! It’s always a great time for us to get out and meet so many of you and have you meet each other. As David Helgason said in the keynote, it’s a great place to make new friends, nurture exciting ideas, and even form new partnerships. It’s an ever evolving industry that we find ourselves in and having friends along for the ride makes it all the better!

Change is constant in such a fast-paced industry and we’re working hard to keep up to meet your needs (hopefully in some cases, even predicting needs). While Unity will be moving in new directions and trying new things as a technology provider, all of our decisions stem from the same mission: democratize game development. To us, it’s summarized as two questions: How will I create my game? How will I connect with an audience? We’re endeavoring to answer those questions and while it’s nearly impossible to fill every need a developer might have, we’re aiming to build the most stable and impressive environment we can for you guys to find success, however you might define it.

In that spirit, David, Joachim, Lucas, Todd, and Jussi kicked the show with a keynote giving the rundown on the industry, Unity and the Unity community’s place in it, and how we’re building Unity as an end to end development platform to address the massive new challenges faced every day by developers.

Check out the full keynote here:

The big takeaways from this year’s Unite keynote were:

  • Unity Cloud Build was announced! It’s a powerful continuous integration service helps you build, test, and share new game projects more quickly. We acquired Austin-based Tsugi to make this happen and created Unity Austin at the same time (they’re hiring)! Better yet, the beta is up and available! Sign up at https://build.cloud.unity3d.com.
  • Unity 4.6 entered public beta! You can now go test out the new UI system for yourself (download here). Tutorials for the Unity 4.6 beta can be found here.
  • Select Unity components will be open source giving you more control to customize components and extend Unity under an unrestrictive MIT/x11 license. The first open source components are the Unity Test Tools and will be followed soon by the new UI system.
  • Unity Everyplay is now integrated in over 700 games with 15M registered users and 6M shared replays. Additionally, new community features are on their way, including social hubs for individual games where developers can take a more active role in discussions.
  • We entered a strategic collaboration with Intel to ensure that mobile developers will be able to bring their games and apps to the new crop of Intel-based Android devices with total ease.
  • We’re collaborating with Google to provide full support in Unity for Google’s Android TV set top box, which is available in the Unity 4.5.3p2 update as part of the Unity Android build.

After the keynote, the event kicked into full gear with an incredible complement of sessions dedicated to helping you all learn about upcoming features in Unity 4.6 and Unity 5 like those talked about in the keynote, best practices from your peers in the development scene that are using Unity, and even more about what we have in store for you down the line. All of the 60 sessions from Unite have been posted online at this point and you can find them here!

We also saw an incredible line-up of games and projects honored at the 2014 Unity Awards.

Each year the bar of quality raises and we couldn’t be in more awe of your abilities and creativity. These amazing finalists and winners along with the hundreds of excellent (and there were many excellent projects not in the finals) projects submitted for the awards this year are what keep us inspired to create the best possible tools for you guys to bend to your creative will.

While Unite 2014 in Seattle was something of a headliner for us as a company this year, Unite isn’t a singular event. We’ve already seen incredible events in China, Japan, Korea, and Taiwan attended by thousands more of our awesome community in Asia. And we’re not done yet! There are two more Unite events taking place this year in October in São Paulo, Brazil and Melbourne, Australia.

brazilaustralia 2014 has, so far, been an amazing year for developers and the games industry in general. Unity is growing and evolving and we hope you’ll all play a big part in what’s ahead! dh2 crowdexhibit roadmap motionleap

awardwinnerslucasscriptingJoachim Ante3Orange Tshirt Guytwo mountains

Xamarin Evolve 2014 Speaker Spotlight: Jonathan Peppers

This is the third post in our Xamarin Evolve 2014 “Speaker Spotlight” series, helping you get to know a little bit more about some of the amazing speakers who will be contributing at this year’s conference.

Photo of Jonathan PeppersToday we’re highlighting Jonathan Peppers, a Xamarin MVP and the lead developer on the MonoGame title, Draw a Stickman: EPIC, winner of two Webby awards for best mobile game and people’s choice for best tablet game. He leads the app development department at Hitcents, a Xamarin Premier consulting partner, and has worked on other successful apps such as The Harlem Shake, Battlepillars, and even the Xamarin Field Service sample app. You can catch Jonathan at Xamarin Evolve giving the talk, “If You Can Ship Your app in China, You Can Ship it Anywhere: In-App Purchase, Piracy Protection, Localization, Culturalization, and More.”

Why did you get into software development?

I’ve always enjoyed computers and playing video games. I started a degree in Computer Science hoping to work on video games some day, but I still enjoy programming in general. In my day job, I’m lucky enough to work on games and interesting apps.

How long have you been doing mobile development?

I’ve been doing mobile development since 2010, when MonoTouch came out. We had to build an iOS app, and we could not stomach Objective-C.

What are your favorite open source libraries, and why?


ModernHttpClient is a solid improvement for any web service-based app. ApprovalTests is a great way to think about unit testing, and I always use it for certain types of unit tests. Raygun has helped us on every project we’ve used it with; getting real time error reports is invaluable with mobile apps.

What is the biggest lesson you’ve learned?

My best learning experience was with the first cross-platform app I was involved in developing. Learning techniques for code sharing in cross-platform applications is useful, but can be difficult to wrap your head around. There wasn’t a lot of information out there at the time, since Xamarin was so new.

What devices are you carrying around with you right now?

I have an iPhone 5S and a Macbook Pro that is always in my bag. I used to carry around an iPad as well, but that has become my wife’s full-time “computer”.

What are you doing when you’re not doing mobile development with Xamarin?

I enjoy spending time with my family and playing “nerd games” like Hearthstone and Magic: the Gathering.

If you missed our first two posts, click through to read about Jesse Liberty and Jon Skeet.

How to handle big files with Plastic

So it's basically done like any other file!

Plastic is not affected by the file size like other systems out there.

Keep coding while we take care of your files.

September 8

Evolve Countdown iOS 8 Today Widget

Count down how many days until Evolve from the iOS 8 notification screen using a Today Widget:

today extension

iOS 8 introduces a variety of extensibility features called extensions. Extensions allow applications to offer user experiences throughout the system in ways that were not available previously to third party developers.

With app extensions, applications can now offer features such as custom keyboards, content sharing, and photo editing to name just a few of the new ways to provide system-wide functionality.

Today Widgets

One type of extension is called a Today Widget, which is an extension that lives on the notification screen along with the widgets provided by Apple. This is a great place for an application to offer updated data for people to consume at a glance without having to open the application. Scenarios involving sports scores, package trackers and news headlines make for good Today Widget use cases.

Evolve Countdown Widget

Let’s take a look at a Today Widget that displays the number of days until Xamarin Evolve 2014.

Widgets are created using an Extension Project template under the Unified API project templates, as extensions are required to support both 64 and 32 bit architectures.

extension project templates

You don’t create a stand-alone extension, rather it must be created and referenced from a container application. In this case, I created a small app that displays the Evolve website in a WKWebView and then added the extension project as a reference.

container project

There are a few configurations that need to be set in the Info.plist for the extension:

extension info plist

In this case, I included a button in the extension that, when tapped, will launch the app so the app registers a custom url scheme as well:

custom url scheme

To create the extension, I designed the UI in a storyboard with a UIImage, UILabel and UIButton respectively. Note, since the unified API is required, use Xcode to wire up controls to code (code generation support for the Xamarin designer will come in a future release).

The notification center determines the frame for the extension. The best way to control the layout of controls is using auto-layout, which is what I used here.

Adding the Extension’s Code

A today widget is just a view controller. Therefore, the code is implemented much like other view controllers, as shown below:

public override void ViewDidLoad ()
  base.ViewDidLoad ();
  PreferredContentSize = new CGSize (PreferredContentSize.Width, 55f);
  var evolveStartDate = new DateTime (2014, 10, 6);
  var numDays = (evolveStartDate - DateTime.Now).Days;
  WidgetTitle.Text = String.Format ("{0} days until Evolve", numDays);
  WidgetButton.SetTitle ("Tap here to register", UIControlState.Normal);
  WidgetButton.TouchUpInside += (sender, e) => UIApplication.SharedApplication.OpenUrl (new NSUrl ("evolveCountdown://"));

When the application is deployed, the user will have the option to include the widget in the notification screen:

include today extension

After adding the widget, tapping the butting results in the app opening, thanks to the custom url scheme it registered:

container app launched

Extensions like Today Widgets allow applications to deliver experiences that only for Apple could provide in the past, so it’s great to see this added flexibility come to iOS.

Join me at Evolve to discuss this and many other exciting new iOS 8 features!

The code from this post is available here.

Discuss this blog post in the Xamarin Forums

Xamarin.Android Garbage Collection Improvements

Mobile operating systems continue to evolve year over year, delivering great APIs for developers to integrate into their apps to create delightful experiences. However, a side effect of this is that the size of the mobile apps that developers are creating on Xamarin is growing. When we designed Xamarin.Android, our Garbage Collector integration was built to handle small to medium sized apps.

Garbage-Sorting-RobotIn large applications this integration, also known as the GC Bridge, was brought to our attention as a source of longer than expected pauses. We took time to dive into the problem and remedy it by introducing two new bridge modes in Xamarin.Android 4.14, currently in the stable channel.

The GC Bridge is responsible for bringing two worlds together: Java and C#. It takes care of the objects that exist on both sides, such as Activity, and makes their lifetime correct for both the Java garbage collector and Mono’s.

Let’s take a look at a benchmark test that creates objects and randomly connects them, which is similar to deep object models we’ve seen in real world apps.

GC Performance 1

As you can see, performance improvements in the new GC bridges are quite drastic. Performance improves 2x to 10x between what we used to get with 4.12 and the new Tarjan mode.

The GC Bridges

Before diving into more details and performance benchmarks, I want to take a moment to describe the different GC Bridges.

    • Old – The default implementation, considered the most stable of the three. This is the bridge that an application should use if the GC_BRIDGE pauses are acceptable.
    • New – A major overhaul of the original code, fixing two instances of quadratic behavior but keeping the core algorithm, based on Kosaraju’s algorithm for finding strongly connected components.
    • Tarjan – A completely new design of the GC Bridge based on Robert Tarjan’s algorithm and backwards reference propagation. It does perform the best under our simulated workloads but has a larger share of experimental code.
    • You can learn more about the Garbage Collector in Xamarin.Android in our Android documentation.

Better, Faster, Stronger

Let’s take a look at a few more performance benchmarks to really see how these new GC Bridges increase the overall app performance.

GC Performance 2

This second benchmark simulates the case where a very popular object is referenced by many objects, which happens frequently when the GUI has lots of callbacks to a central backend object. As you can see, it’s not just faster, but scalable, as the number of incoming links barely affects performance.

GC Performance 3

This last benchmark creates a structure where half of the objects point to a single object that in turn points to the other half of the objects. It’s not common in practice, but it shows how both new bridge modes are necessary – each one shines when used on different workloads, which can only be discovered by trying both.

Enabling this new functionality is as easy as adding an environment.txt file to your project with the BuildAction set to AndroidEnvironment. Then you can specify which GC_BRIDGE option your application should use by passing bridge-implementation=old, bridge-implementation=new, or bridge-implementation=tarjan to the MONO_GC_PARAMS environment variable. Here is an example:

MONO_GC_PARAMS=bridge-implementation=tarjan<br />

Enabling Garbage collection

Our awesome documentation explains in detail how to enable the new bridges so you can make your apps more responsive today.

Learn More

Xamarin Evolve 2014 banner with dates (October 6-10) and location (Atlanta, Georgia)To learn even more about GC Bridges, be sure to join me at Xamarin Evolve 2014, where I will be deep diving into GC and performance on both iOS and Android during multiple sessions.

September 3

600 releases of Plastic and counting

Today we've released Plastic Yes, 600. Six hundred official releases since our first one back in 2005, more than one year before Plastic was launched.

Plastic has changed *a lot* during these years in all imaginable aspects: from performance to GUI, features, security, ease of use... almost everything version 1.0 included has been redesigned an incredibly improved a few times since.

I still remember reading great Spolsky's post saying 'Great software takes 10 years' and thinking "hey, can't be true! 10 years! When did he go crazy?" and I've to admit that as we get closer to 10 years in business I think I understand better than ever what it takes to develop good software.

Plastic *had to* change and evolve because our challenges turned out to be much bigger: our first paying customer was located in Northern Spain and had less than 10 developers. Things are bigger now and more demanding like an Asian company with more than 1000 developers working concurrently on a huge codebase and taking advantage of everything from distributed to high scalability and Xlinks.

We used to perform checkins of the quake source code as benchmark. The first checkin ever took 11 hours to complete! 11 hours (we threw up that code!). Nowadays we don't use this code anymore for testing since it is too small (a checkin takes about 4 secs or so and not even a 300Gb checkin takes so long).

Some of the core ideas in the first Plastic version persist, though. We wanted to turn "branch per task" into a mainstream practice to help developers on a daily basis, telling a story checkin after checkin and being able to use the version control not just as a delivery mechanism (that used to be most feared than loved) but as a real productivity tool you can't live with even if you're working alone. You checkin 'almost' as often as you hit CTRL-S (unless you're in vim :P). And this is something that is still there and it is easier to explain today than it was back 600 releases ago.

Looking back...

If you go back to the early posts on this blog you'll be able to go through the evolution of the initial Plastic releases, even before the official launch of 1.0.

From some really early GUI screenshots to my beloved and now defunct 3D version tree (which I expect will return soon and I hope will be much appreciated by game developers moving to Plastic).

Visit this album of 'historic' screenshots at our Facebook.

Back in 2005 we expected to fight the SVNs of the world and when we started visiting companies and explaining why using branches was good, we faced tons of skepticism.

Things got better after the Git revolution which evangelized the whole community teaching how things could be done in a different way.

Branching and merging was not evil anymore but the powerful tool to take advantage of.

As a result, nowadays instead of having to change developer's minds we basically get teams knocking at our door asking for good branching and merging, distributed AND centralized combined, visualization and good GUIs. If you put these three blocks together only Plastic stays as a valid choice, which is why despite of the distributed version control revolution lead by open source Git, there are still companies willing to pay for the software we develop.

We don't fight SVNs anymore (although we keep replacing them, but not really fighting :P) but we face big challenges since we focus only on teams that need really advanced features not available anywhere else. A real challenge which fortunately means we've to design new features and work on so many different areas that we can never say our job got boring after all these years.

Congratulations to the entire Plastic SCM team!!

Thanks to all the customers who make this adventure possible!

Documentation, Unity scripting languages and you

Everybody has their favorite scripting language, and the use of different languages evolves over time. Historically, we have supported three languages: C#, UnityScript (also known as JavaScript for Unity) and Boo. Of course, we aim to concentrate our support on the languages you want to use.

Currently, according to our editor analytics statistics, the percentage of scripts created in the three languages break down like this:


This means that, as so few people use Boo, and the resources required to support it in the docs are not negligible, we’ve decided to drop support for Boo documentation for the Unity 5.0 release and use our resources in a more constructive way.

When Unity 5.0 launches, we will also drop “Create Boo Script” from the menu. That said, and very importantly, if your project contains Boo scripts, they will still work just as before.

We have listened to your feedback, and what you’ve been telling us that you really want from your documentation is C# examples across the board. As a consequence, we’re also moving internally to provide the best support for C# that we can.

Currently, most Tutorials, and Sample Assets are based around C#, and in the 5.x cycle, we’ll ensure that all our C# examples in the documentation are first-class citizens.

Side note: up until now, our internal procedure has been to write sample code using UnityScript / JavaScript, which is then automatically converted to C# and Boo. We’ve now made it possible for Unity engineers to author their examples in C# and auto-convert them to UnityScript, using a newly developed and improved C#-to-UnityScript converter.

Thus, many of the C# examples you’ve been requesting are now live, and even more will be ready when Unity 5.0 comes out. W00t!

September 2

Npgsql 2.2.0 final release is out!

This is Npgsql 2.2.0 Final Release

This release contains 249 commits since the last stable release. Includes bug fixes, improvements and new features.

Update notice: If you have been using Npgsql 2.2.0-rc2, you don't need to update to this version. They are the same except for the Assembly version information.

Major highlights

Visual Studio DDEX support


Kenji Uno added support for DDEX. Now you can use Npgsql with Visual Studio data designer. This is a missing feature a lot of our users requested in the past. Kenji added a tutorial about how to use Npgsql with DDEX. You can find it here: https://github.com/npgsql/Npgsql/wiki/Visual-Studio-Design-Time-Support---DDEX-Provider#install-npgsqlddexprovidervsix


Entity Framework


David Karlaš added support for EFMigration and Database creation in EF6+.
Now it is possible to start Code First projects without needing to create a database upfront. EntityFramework and Npgsql will take care of it.

Emil Lenngren added support for a lot of missing features of EntityFramework.

A list containing fixes from David and Emil as well as others for EntityFramework can be seen here: https://github.com/npgsql/Npgsql/issues?direction=desc&labels=entity+framework&milestone=2&page=1&sort=created&state=closed


SSLStream support


In this release, SSLStream is on by default.
If you want to use Mono.Security, you will need to use the following line in your code:
NpgsqlConnection.UseSslStream = false; 
Note that in future releases, this option may not be available anymore as we are removing the dependency on Mono.Security assembly. Let us know in the forums if you have any problem with ssl when using SSLStream. This will help us check if we will be able to remove Mono.Security assembly.


Added support for JSON, JSONB and HSTORE datatypes

Shay added support for those datatypes.


Added GSSAPI support on Windows

Brian Crowell added support for GSSAPI on windows. Now it is easier to use Active Directory when authenticating users.


Removed support for protocol v2

Postgresql versions which use only protocol 2 are very old and don't receive support from postgresql group anymore. By removing support for protocol version 2, we removed a lot of code and can focus on functionalities provided by protocol 3.


Removed support for Postgresql 8.4 and below

In this thread, we talked about making Npgsql support the officially supported postgresql versions. we talked about making Npgsql support the officially supported postgresql versions. Postgresql has a table of officially supported versions and we decided to follow this table to guide us which postgresql version we will have support to.
This doesn't necessarily mean that Npgsql won't work on unsupported versions. It may work if we don't add any SQL or unsupported feature. For example, today Npgsql 2.2 works only on Postgresql 8.2 and above because we added server side support for command timeout handling and some other queries which aren't supported on earlier versions.
If you are using earlier postgresql versions, please, use an older version of Npgsql. We are creating a compatibility table to show which Postgresql version Npgsql works with.


Fixed bugs:

[#91] Support for EFMigration and Database creation
[#152] NpgsqlInterval different constructors different ToString
[#158] NpgsqlCommand.Dispose() should execute "DEALLOCATE " for a prepared command
[#177] XML data type doesn't seem to be quoting parameters properly on insert
[#179] NpgsqlCommandBuilder automatic sql commands configuration
[#188] Buffer too small problem in NpgsqlCopySerializer
[#201] Dynamic type parameters: Cannot cast System.Int32 into any valid DbType after upgrading from to
[#208] ObjectDisposeException
[#217] Impossible to insert a Double.NaN value
[#219] [#1011005] using 2 NpgsqlCopyIn at the same time
[#223] HasRows property's bug
[#231] NpgsqlParameterCollection.Clear() doesn't reset NpgsqlParameter.Collection
[#225] Handle IEnumerable parameter
[#233] Cannot insert to tables which have only one column
[#246] Take followed by Skip is generated incorrectly in Entity Framework
[#262] FirstOrDefault() on navigation property subquery throws “Not Implemented” Exception
[#264] Mono.Security is outdated
[#269] Fix 's' value mapped to the 'a' byte
[#280] Bad SQL produced when selecting a field that was also used in the orderBy of a let subquery
[#287] Fix operator handling and date functions for EF
[#296] parameter parsing fails (regression) and duplicate [#240] NpgSqlCommand does not substitute parameters when there is a string with escaped apostrophe
[#315] Fix query parameter processing to more correctly match PostgreSQL's lexer
A list of the issues and pull requests merged for this release can be found at github here: https://github.com/npgsql/Npgsql/issues?direction=desc&milestone=2&page=1&sort=created&state=closed


Known Issues

There are some issues we are working for the next maintenance release 2.2.1. You can check which issues we are working on here: https://github.com/npgsql/Npgsql/issues?q=milestone%3A2.2.1



I'd like to give a special thanks to Kenji Uno for his excellent work with Npgsql DDEX support. DDEX support was one of the biggest missing features of Npgsql.
I'd like to thank Emil Lenngren for all his work with Entity Framework improvements and insightful comments, David Karlaš for his help with Entity Framework support. Shay Rojansky, Glen Parker and Josh Cooley for all contributions and comments, and a big thanks to all the other contributors who helped us to make this release.



Downloads are available on Nuget, github and pgfoundry.
Please, give it a try and let us know what you think. Drop by our user forums to discuss or send your bug reports to our issues section on github.


 List of contributors for this release

Kenji Uno
Shay Rojansky
Glen Parker
Emil Lenngren
David Karlaš
Brian Crowell
Tuan Nguyen
Frans Bouma
Jaspalsinh Chauhan
Josh Cooley
Martin Willey
Francisco Figueiredo Jr.
Javier Torres
Kevin Pullin
Michael de Lang
Oskar Gewalli
Sunny Ahuwanya
Thomas Radioyes

Build Your Own Continuous Integration Pole

If you live in Boston and happen to walk around the Commons when evening falls, you may have noticed a strange glow coming from the top of one the building along the park:

A Mysterious Glow on Boston

This eerie light comes from our designer pole, an experiment I did to provide cheap feedback over our build status in our continuous integration system:

Le Pole

The setup is based around 3 main components: a Raspberry Pi, a 5V relay module board and a basic 12V RGB LED strip. You can buy all those parts directly from Amazon for about $112 total (of which $77 was for a premium Raspberry Pi package but it’s up to you).


No matter the RGB LED strip “brand” you end up buying (it all seems to be from the same generic supplier), the wiring is pretty simple and consist of a common ground and a wire for each color channel (red, green, blue) so 4 wires in total.

Thus in the simplest form we can very easily turn on and off those channels using a bunch of relays. Each build status (success, test failure and build failure) will be mapped to a specific color (green, blue, red respectively).

A relay is the basic building block to control a power circuit (the 12V DC from the LED strip power adapter) from a control circuit (the 3.3V DC of the Raspberry Pi). There are a bunch of different designs available (magnetic, solid state, …) depending on the amount of power you are controlling. For this type of setup pretty much anything should work (it’s just LEDs after all).

A relay module

Those relays are then mounted on a board like the one in the picture to conveniently expose a control interface that you can plug to your Raspberry Pi GPIO ports. That’s the final product you can buy (unless you want to do your own PCB).

Below is a close-up of the wiring between all the different pieces, the GPIO ports are exported to the breadboard and then connected onto the relay module control circuit.

Close-up wiring

I also made a more schematic version so that you can see which GPIO ports are used:

Wiring schema

The common of the LED strip (the white cable) is connected directly to the power source (we don’t care about controlling it). All the other color wires go in and out of their own relay.

If you are short on connectors, you may have noticed a little trick I use which is to go scavenge your old computers for IDE connectors (what you used to plug your old harddrive, floppy disk readers and the likes). They fit perfectly well and have the same type of wire that standard Dupont cables.

Below is the part of the code that controls the relay module to turn on and off the LEDs:

using System;
using System.Threading;
using RaspberryPiDotNet;

namespace WrenchBerry
	public static class Ledder
		public enum Color {

		static GPIOPins[] pinMapping = new GPIOPins[] {

		public static void FlashLed (Color color, int times = 3)
			var pin = pinMapping [(int)color];
			for (int i = 0; i < times; i++) {
				GPIO.Write (pin, true);
				Thread.Sleep (500);
				GPIO.Write (pin, false);
				Thread.Sleep (500);

		public static void TurnOn (Color color)
			var pin = pinMapping [(int)color];
			GPIO.Write (pin, false);

		public static void TurnAllColorOff ()
			foreach (var pin in pinMapping)
				GPIO.Write (pin, true);

The code use the RaspberryPi.Net library to directly access the chip memory controlling the GPIO pins.

The main program is then a super-simplistic infinite loop over the CI results:

using System;
using System.IO;
using System.Linq;

namespace WrenchBerry
	class MainClass
		const Ledder.Color NoColor = (Ledder.Color)(-1);
		static Ledder.Color currentColor = NoColor;

		public static void Main (string[] args)
			var lane = args [0];

			while (true) {
				try {
					var builds = CISystem.GetStateListFromLane (lane);
					if (builds == null || builds.Length == 0 || !builds.Any (IsFinishedState)) {
					    Console.WriteLine ("Lane or fetching is fucked up");
					var firstBuilt = builds.First (IsFinishedState);
					Console.WriteLine (DateTime.Now.ToString ("u") + " - " + firstBuilt);

					Ledder.Color color = GetColorForState (firstBuilt);

					if (color != NoColor && currentColor != color) {
					    Ledder.TurnAllColorOff ();
					    Ledder.FlashLed (color);
					    Ledder.TurnOn (color);
					currentColor = color;
				} catch (Exception e) {
					Console.WriteLine (e);

				System.Threading.Thread.Sleep ((int)TimeSpan.FromMinutes (2).TotalMilliseconds);

		static Ledder.Color GetColorForState (DBState state)
			Ledder.Color color = NoColor;
			switch (state) {
			case DBState.Failed:
				color = Ledder.Color.Red;
			case DBState.Issues:
				color = Ledder.Color.Orange;
			case DBState.Success:
				color = Ledder.Color.Green;
			return color;

		static bool IsFinishedState (DBState state)
			return state == DBState.Failed || state == DBState.Issues || state == DBState.Success;

All that’s left to do is to make yourself a nice little storage area and, why not, spice up the system a little bit. For instance in our setup (pictured below) I also hooked up a small speaker.

Final Setup

As an example our current playlist consist of: the Imperial March (build failure), Mass Effect Reaper sound (test failure) and, last but not least, our friend He-Man (build success).

Happy (hardware) hacking!


Monologue is a window into the world, work, and lives of the community members and developers that make up the Mono Project, which is a free cross-platform development environment used primarily on Linux.

If you would rather follow Monologue using a newsreader, we provide the following feed:

RSS 2.0 Feed

Monologue is powered by Mono and the Monologue software.