Fresh Evolve 2013 Video Goodies Available

Straight from the Xamarin Evolve 2013 director’s room, we’ve just uploaded six great new videos:

  • Josh Clark’s Buttons are a Hack session, which mines a variety of surprising sources for interface inspiration and design patterns to help you understand and craft new gesture vocabularies.
  • Xamarin engineer James Clancey covers how to get the most out of Xamarin.Mobile, and
  • Xamarin engineer Marek Safar deep dives into the benefits and best practices for taking advantage of Async in your Mobile Apps.

In addition to posting these talks, we have enabled downloads for all videos from the show so that you can Evolve wherever you go. We have many more great iOS, Android, cross-platform and Enterprise Mobility talks still being finalized, so stay tuned.

Posted on May 23, 2013

First Wave of Cross-Platform Evolve Sessions Available

Just in time for your weekend viewing pleasure, the first wave of Xamarin Evolve 2013 sessions are now available.  Dive into 8 technical sessions on Xamarin and cross-platform best practices. Highlights include:

Scott Hanselman’s entertaining session on how C# Saved his life, his marriage and made him an inch taller.

Bastion creator Andrew Wang, CTO of Supergiant Games, brings cross-platform lessons learned for all mobile app developers in his session Multiplatformism:  Lessons learned bringing Bastion to Six New Platforms.

Intro to Calabash, the automated testing framework used in Xamarin Test Cloud, is covered by creators Karl Krukow and Jonas Maturana Larsen.

Additional sessions cover mapping and location, code-sharing best practices, barcode scanning, and Xamarin.Mac. Enjoy!

Watch Evolve 2013 Sessions

Posted on May 10, 2013

Introducing Objective Sharpie

I am pleased to announce a new tool from Xamarin: Objective Sharpie, a very powerful binding definition generator for third party Objective C libraries to help provide APIs matching the .NET idioms and ensure delightful APIs. Objective Sharpie

Objective Sharpie takes much of the manual work of translating Objective C APIs into binding definitions that are consumed by Xamarin’s binding tools. Download your third party library, point Objective Sharpie to its header files, and off you go.

It does this using Clang and the SDKs installed in Xcode to extract all the API metadata needed to produce a binding: selector names, argument and return types, enums, and so on.

The only prescribed work is to transform public C# names to conform more to the Framework Design Guidelines (though this is optional, it’s highly recommended to produce an API that is a joy to consume).

Visit the Objective Sharpie documentation to learn more and download the tool for use today.

In the future we expect to integrate Objective Sharpie directly into Xamarin Studio as part of the binding project workflow. For now though, it’s quite useful enough that we wanted to release it as a standalone tool.

Download Objective Sharpie


A Little Backstory

When I first started working to bring new APIs introduced in OS X Lion and Mountain Lion to Xamarin.Mac, it took a while to sink in the daunting and tedious task was laid before me. Lion in particular introduced hundreds, actually, thousands of new APIs – many of which were ported from iOS to Mac OS X.

This fear of monotony fueled me to implement a tool that used Clang as a library to gain access to every single detail of the source tree as it’s parsed. With this information, I was able to start generating C# code that represented a verifiably correct binding.

It’s important to note that we build Xamarin.Mac and Xamarin.iOS using the exact same binding tools that are available in Xamarin Studio to bind third party libraries. And now Objective Sharpie is no different: it helps us deliver faster on new APIs and ensure that they are accurate and error-free by producing a correct binding definition up front.

While there’s always more work to do, and the full Objective C language isn’t covered, most of the common parts are. It should today be a very valuable tool for getting a binding going in the right direction… with much less typing and much more copy and paste.

If you find something missing or incorrect, please let us know!

Posted on May 8, 2013

Using custom Fonts in Xamarin.iOS

Apple introduced a great feature when it released the iOS 3.2 SDK way back in 2009: support for adding custom fonts to apps. Since then, developers have made their apps stand out by using different fonts.

Although adding fonts should be a very simple process, developers often express confusion over how to do it for Xamarin.iOS apps. The process has a few “gotcha’s” that might catch you off guard if you skipped your morning coffee or you are trying to get a release out late at night.

CustomIOSFonts

In this blog post, I describe how to add a custom font to a label. This should give you an understanding of the process and help you if you’re stuck.

First, find yourself a font with a suitable license. I use dafont.com, a great resource for finding awesome-looking fonts. You can quickly find free fonts that you can use in your application at no cost; however, if you find a premium font you like, you may be able to license it. In this example, I am going to use a free font titled HollywoodHills.ttf. You can download a copy yourself if you wish to follow along.

FontSample

When searching for suitable fonts, it’s worth remembering that iOS only supports TTF and OTF. This shouldn’t be a problem as most fonts available online come in these two formats.

Add the font

You should add the font to your project by either dragging and dropping it to a folder or right clicking and selecting ‘Add existing file.’ In this example, I have added the font to the Resources folder. You can, of course, add the font to any folder—including the root directory if you so choose.

Once you’ve added the font, you should then right click it and select the ‘Properties’ menu option. You will need to change the build property ‘Copy to output directory’ to ‘Always copy.’ If you forget to do this, you will get a null exception error when trying to reference the font at runtime. This will cause your App to crash.

fontProperties

Highlighted property for clarity

Info.plist

The next step is to tell iOS where your custom font is stored. iOS will load these fonts at startup, so it pays to use custom fonts sparingly—it can slow the startup time of your App.

To tell iOS you are using custom fonts, you should open the Info.plist file and select ‘Source’ at the bottom of the view. This will change the UI to be more inline with Xcode’s property editor.

Once you’ve done this, you should then double click on ‘Add new entry’ and select the ‘Fonts provided by application’ option. It is here that you input the location of the font so that iOS knows where to look when loading the fonts at startup. Because I have put the font in Resources, I can simply type ‘HollywoodHills.ttf’ as the value. If I had put the font in Resources/Fonts, then I would set the value to ‘Fonts/HollywoodHills.ttf’.

Using the custom font

Now comes the interesting part: using the font. Let’s create two labels, one with our custom font and the other with the default. I’ve included code below that will make and place these labels for you. You can copy and paste the following code into your application’s ViewDidLoad method. Try running the app to see how it looks. If you configured your project as I described above, it should work with no issues.

//Get size of screen
var height = UIScreen.MainScreen.Bounds.Height;
var width = UIScreen.MainScreen.Bounds.Width;
//Labels
var lab1 = new UILabel(new RectangleF(0,0, width, height /2));
lab1.Text = "This is some sample text";
lab1.Font = UIFont.FromName("HollywoodHills", 20f);
this.Add(lab1);
var lab2 = new UILabel(new RectangleF(0,height /2, width, height /2));
lab2.Text = "This is some more sample text";
this.Add(lab2);

When you run your App, you will now see that the top label uses the custom font you downloaded from Dafont. It’s as easy as that. If you are having problems, you should double-check that you have selected the ‘Always copy’ build property for the font and that the path is correct in the Info.plist.

I hope you enjoy using custom fonts in Apps as much as I have.

Posted on May 7, 2013

Introducing the Xamarin Speaker Program

Since Xamarin 2.0 and Evolve, we’ve received an overwhelming number of requests from developers who are eager share the Xamarin story with their local community. Today, I am pleased to announce the launch of our official Xamarin Speaker program, which will make it easy for developers to connect with great events and share their experiences with C# mobile development.

Everyone is talking about mobile C# development, and you can too.

Everyone is talking about mobile C# development, and you can too.

The Speaking and Events section of the Xamarin forum is where the action is happening. It’s a place where speakers and event organizers can coordinate speaking engagements and share their experiences. It’s also a venue for sharing slides, code samples, and other resources that might be of interest to Xamarin presenters. Please email us if you’re interested in speaking, looking for a speaker, or ready to share details about a talk you’re giving or plan to give—or even better, you can swing by the forums and introduce yourself.

Posted on May 6, 2013

Evolve 2013 Recap and Videos

Xamarin Evolve 2013 was incredible! We hosted over 600 mobile developers from 15 countries. Forty-six speakers delivered 80 hours of training and conference sessions. Xamarin engineers worked individually with mobile developers in 116 one-on-one sessions, consulting on architecture, performing code reviews, and troubleshooting issues. One hundred fifty attendees earned prizes for completing 4 or more Mini-Hacks. Over 400 developers were trained to become our first-ever Certified Xamarin Mobile Developers.

In between all of the events, the Darwin Lounge was the place to hang out, get a massage, work on Mini-Hacks, play with the 3-D printers and AR drones, and show off apps.

For those of you who missed it, or for those who want to relive the magic, the Evolve 2013 keynote video is now available. You can kick back and watch the whole thing, or hone in on the segments of most interest to you.

Watch Evolve 2013 Keynote


The Big Announcements

We talked a lot about the Xamarin mission to delight developers at every stage of their mobile development, and at the conference Miguel and I made 4 major product announcements:

  • Xamarin Test Cloud: Beyond cross-platform development, the #1 pain point for mobile developers is testing apps. In fact, it is such a challenge that 92% of developers don’t do it, and yet quality matters even more on mobile. In the keynote, we unveiled Xamarin Test Cloud, the world’s best tool for automated UI testing, where apps are automatically tested on hundreds of real devices, all in the cloud. We also announced our acquisition of LessPainful, the creators of Calabash, the most widely used cross-platform mobile test automation framework.
  • iOS Designer:  We have extended Xamarin Studio (and soon Visual Studio too) with a native user interface designer for iOS applications. In addition to supporting all of the UIKit user interface elements, our designer is capable of editing your own custom components or third party components. You can customize the properties of your views and see the changes take place live on the designer surface. Our designer also adopts the familiar idioms of designers from Visual Studio, so it is easy to add event handlers to native UIKit components and reference those from your source code.
  • Async:  Available from our Beta channels, we’ve brought .NET 4.5 Async support to Xamarin for iOS, Android and Mac, along with many new Async API entry points for iOS and Android. Watch the video to see before and after code snapshots comparing classic asynchronous programming (using callbacks) vs Xamarin’s new async / await keyword support, which results in much simpler, more maintainable code. Along with this release, Xamarin is upgrading the entire stack to Mono 3.0, picking up the new Mono garbage collector, C# 5.0 and .NET 4.5 APIs.
  • F#: Since its first inception, .NET was designed to support multiple languages, and thanks to the hard work of the F# community, F# compilers for iOS, Android and Mac are now available in the Xamarin Beta channel. You will also need to install the F# extension to Xamarin Studio. We’re excited to see the mobile innovation from functional developers with F# and Xamarin.

Responses to Xamarin Evolve 2013

Several Xamarin Evolve 2013 attendees wrote their own blog posts about the event, capturing the experience from their perspective. We’ve collected links to the best blog posts below so that you can see what attendees have to say about the conference.  See the best tweets from the event on the Xamarin Storify Page.

“Last week they threw their very first conference, and it was a truly impressive feat. A giant stage, exciting keynotes, new product announcements, live recordings of all sessions, and amazing one-on-one support with Xamarin engineers.”

“I’m pleased to say that Evolve far exceeded my expectations and in fact, without a doubt, this was the best conference I’ve been to.”

“In closing, I’d just like to give my compliments to the whole Xamarin staff and the production company for putting together an inspiring conference. I loved the attention to detail that was visible everywhere.”

“Last week I attended the Xamarin Evolve 2013 conference in Austin. It was, hands down, the best conference that I have ever attended.”

“It was definitely a great event and Xamarin deserves major kudos, both for the event itself, but also for their products and impressive keynote announcements.”

“Evolve 2013 is over and what a show it was! The whole Xamarin team did a fantastic job of putting on a great conference and it was superb to meet so many of you from experienced mobile dev gurus to complete novices taking your first mobile development steps.”

“I knew Xamarin was a great solution for cross-platform mobile applications, but after attending Evolve, I’m convinced it’s a terrific solution even for apps on a single platform.”

The rest of the conference sessions and training will be rolled out over the next few weeks, so stay tuned for more great Evolve content. We can’t wait to do it again next year!

Posted on May 2, 2013

Xamarin Evolve 2013 Keynote

Xamarin co-founders Nat Friedman and Miguel de Icaza are presenting the opening keynote this morning at Xamarin Evolve 2013, our first-ever developer conference. Over 600 people from all over the world have converged in Austin be a part in this amazing event. Those of you who aren’t with us here today can still share in the experience by watching a live stream of the keynote.

There are two separate ways to tune in—you can follow our liveblog below or visit xamarin.com/evolve to watch a live video stream. The video stream will put you right in the middle of the action: it’s the next best thing to being in the actual room. The liveblog is a real-time feed of text updates and photos posted from the event, ideal for those of you who prefer text or want to follow along while multitasking at work.

The opening keynote begins at 9AM Austin time. Stay tuned!

Thanks for watching!

Posted on April 16, 2013

Live Streaming of Xamarin Evolve 2013

Screen Shot 2013-04-03 at 11.07.21 AM

We are excited to announce that Xamarin Evolve 2013 will be streamed live online! Tune in to xamarin.com/evolve at 9am Austin time on Tuesday, April 16th for the keynote address, where Nat Friedman and Miguel de Icaza will make some exciting product announcements. Discussions will be on hashtag #xamarin on Twitter.

Main stage sessions will be streamed live for both conference days, so you will be able to catch 11 out of the 50 total sessions at Xamarin Evolve 2013 online. The remainder of the sessions will be recorded and recordings will be made available after the event ends.

A huge thank you to Platinum Sponsor Microsoft for sponsoring the live streaming of Evolve.

microsoft-logo

Here is a schedule of the keynote and sessions that will be available live.

Posted on April 10, 2013

Evolve 2013 is Officially Sold Out!

Screen Shot 2013-04-03 at 11.07.21 AMOur first ever worldwide developer conference, Xamarin Evolve 2013, is officially sold out! We have far surpassed our initial attendance estimates, and have completely filled the larger venue we moved to in December. Over 600 mobile developers and industry leaders are now attending Evolve!

The full schedule for the conference sessions is now online. In addition to two full days of in-depth mobile development training, we have an amazing conference schedule with more than 50 sessions by mobile experts from around the world.

Many thanks to our speakers and sponsors who are helping make this an unforgettable event. And thanks to our incredible developer community – we are humbled by your overwhelming show of support.

We look forward to seeing you in Austin!

(If you’re attending Evolve and have questions, drop us a note at evolve@xamarin.com)

Posted on April 8, 2013

Announcing the Dropbox Sync Component and Dropbox at Evolve

dropboxsyc2

We’re so excited to announce that Dropbox’s recently released Sync API is now available in the Xamarin Component Store, and that Dropbox is sponsoring Xamarin Evolve 2013, our worldwide developer conference beginning April 14 in Austin. Rumor has it that there will be some tantalizing Dropbox giveaways at Evolve…

The Dropbox Sync API allows developers to add full Dropbox sync functionality to their iOS and Android apps with a few simple lines of code. The Sync API manages user authentication, caching, retrying, asynchronous writes, offline access, and file change notifications, letting developers code in terms of basic local file operations while Dropbox does the dirty work of syncing files to the cloud.

Just as Dropbox takes the pain out of syncing files, the Xamarin Component Store takes the pain out of integrating third-party software with your apps. All it takes is one click to add the Dropbox Sync component and a full-fledged Dropbox client to your Xamarin app.

Download the free component now, then run the included sample app, or follow the instructions to add sync to your own apps today. iOS compatibility is available now, and Android will be supported shortly.

Posted on April 4, 2013