Category Archives: Uncategorized

Cross platform Contacts API

We have released a new preview of the Xamarin.Mobile API.

We have now introduced a cross-platform Contact API that gives developers access to the phone’s address book. This is what our stack looks like with the latest preview:

Download the XamarinMobileApiPreview.Zip and check out the updated Xamarin.Mobile API documentation.

This release contains MonoTouch and Mono for Android bindings, a future version will ship will add Windows Phone 7 support.

Help us plan what should be our next feature by filing out our API survey.

Holiday Season Beta Packages

To ensure that developers everywhere get the most out of their upcoming holidays, we have released to our Beta channel new versions of MonoTouch, MonoDevelop and Mono.

You can pick and choose which components you want to try out, they can be installed independently of each other, and will allow you to try out different things. What follows will give you an overview of what you can expect in each one of the betas.

The Tastiest Treat

The tastiest of the treats is the Mono beta release. This beta release contains an incremental update to Mono (2.10.7) and also a completely new Gtk+ stack.

The new Gtk+ stack was developed by a Lanedo/Xamarin collaboration and fixes hundreds of rendering glitches and usability problems that have plagued MonoDevelop for years. Lanedo is a company that specializes in Gtk+ and have among their staff some of the key developers in Gtk+ and with their expertise they have vastly improved the MacOS port of Gtk+ and fixed many of the bugs that our users have filed over the past few months.

The Gtk+ improvements are not limited to bug fixes and glitch fixing. Lanedo has also implemented Smooth Scrolling for our Lion users.

We are putting this on the Beta channel because we want to gather your feedback and fix any major issues that might have escaped our testing process before we make this the default.

MonoTouch

The MonoTouch 5.1.1 release has been updated to the latest version of MonoTouch.Dialog, added System.IO.MemoryMappedFiles (due to a build error, we did not ship it in 5.1.0) and comes with key components that will be unlocked by the next stable release of MonoDevelop next week (stay tuned for these changes!)

MonoDevelop Beta

This is truly a beta, we are using the Beta channel of MonoDevelop to allow users to try out the new code-completion engine of MonoDevelop. This new codecompletion engine has been written entirely on top of Mono’s Compiler as a Service and should be more precise, handle more scenarios and provide better completions.

Black Friday Sale!

You don’t have to risk life and limb braving the crowds for an amazing deal in the post-Thanksgiving sales madness.  Xamarin has a special promotion to reward developers committed to mobile hacking this holiday weekend. That means you!

Xamarin invites you to celebrate the season by building new and inspiring apps to share with the world. And, in the spirit of the holidays, we want to share the joy of MonoTouch and Mono For Android with your friends. That’s why, between now and Sunday, we invite you to tweet Xamarin for huge black friday savings. Just follow the link to post a message about Xamarin’s black friday promotion from your Twitter account, and you will be redirected to awesome savings.

To take advantage of this spectacular deal, just visit xamarin.com/blackfriday

Don’t be late: this offer is only good while supplies last!

Introducing the Xamarin Mobile API

With both MonoTouch and Mono for Android we have chosen to expose the native platform APIs to C# developer so they can take advantage of all the unique features that each platform has to offer. This means that Android developers can create applications that interact with the system in the same ways that a Java app would do, while taking advantage of C# and the .NET class libraries. On iOS this means that developers can consume iOS-specific features like CoreAnimation, CoreImage and program directly against the UIKit API to get the most out of the native platform:

Current Stack of MonoTouch APIs

The above approach allows developers to get the most out of the underlying platform. For this to work beyond a single platform, developers normally split their code along the lines of the components that must deal with the platform specific APIs, mostly the UI elements, and the components that only require the .NET Base Class Libraries (BCL). Usually the core application or the business logic goes into a reusable library and then multiple front-ends are created, one for iPhone, one for Android and even ASP.NET and WP7 UIs can be built on top of it.

But often developers find that many other services that are common across mobile platforms are not exposed by the .NET BCL. This makes the effort of sharing code more cumbersome than it should be. Developers resort to creating their own platform abstractions, or designing pluggable architectures just to get access to the system address book, the phone’s GPS, the compass, the accelerometer, the notification service or the system calendar.

To solve this problem, we are introducing Xamarin.Mobile. This is a library that runs on iPhone, Android and Windows Phone 7 which abstracts the underlying functionality and exposes a common API that developers can built against:

Xamarin Mobile Stack

Today we are launching a preview of the Xamarin.Mobile library. This first version contains our cross platform location APIs for both Mono for Android and MonoTouch (Windows Phone 7 will be added in an upcoming release). You can download the binaries here.

We are running a survey to better understand which are the most important APIs and platforms for our community.

If you want to send us feedback or report bugs, please File a Bug Report in our bug tracking system.

MonoTouch Beta Release

We have just released to the Beta channels the first beta for our upcoming MonoTouch 5.2 release.

The MonoTouch 5.1 Beta contains the following features:

  • The MonoTouch.Dialog library is now part of MonoTouch. This allows developers to build applications in a fraction of the time.
  • Unit testing framework Touch.Unit to create unit tests for your MonoTouch applications.
  • System.Numerics library that contains BigInt and Complex data types.
  • System.IO.MemoryMappedFiles
  • New MapKit APIs
  • Our Generation Collector works.
  • Linker Improvements:
  • Parallel LINQ preview
    • Notice that there are some limitations due to Generics that we will be improving on future releases

We are very excited about making MonoTouch.Dialog part of this release. To ensure compatibility, we renamed this assembly to “MonoTouch.Dialog-1”, this will avoid any conflicts with existing users of the library. This library will continue to be developed as an open source library, and regular updates will be added to MonoTouch.

With MonoTouch.Dialog, you can build UIs in minutes. For example this entire UI:

Was created with this code:

return new RootElement ("Settings") {
    new Section (){
        new BooleanElement ("Airplane Mode", false),
        new RootElement ("Notifications", 0, 0) {
            new Section (null, "Turn off Notifications to disable Sounds\n" +
                     "Alerts and Home Screen Badges for the\napplications below."){
                new BooleanElement ("Notifications", false)
            }
        }},
    new Section (){
        CreateSoundSection (),
        new RootElement ("Brightness"){
            new Section (){
                new FloatElement (null, null, 0.5f),
                new BooleanElement ("Auto-brightness", false),
            }
        },
        new RootElement ("Wallpaper"){
            new Section (){
                new ImageElement ("flowers.png"),
                new ImageElement ("sand.png"),
                new ImageElement ("sky.png")
            }
        }
    },
    new Section () {
        new EntryElement ("Login", "Your login name", "miguel"),
        new EntryElement ("Password", "Your password", "password", true),
        new DateElement ("Select Date", DateTime.Now),
        new TimeElement ("Select Time", DateTime.Now),
    },
}

You can check out the full MonoTouch.Dialog samples from GitHub.

Meet the Xamaritans

Most of the year, the Xamarin team is spread out across the world — in 14 countries. And so, every three or four months, we all get together at our home base in Boston for a week to plan our next steps and to hang out. We call this our Xummit.

This week is Xummit week, and we want to meet you.

So, for those of you in the Boston area, or who can get here by car, train, or hovercraft, please  join us at John Harvard’s Pub in Harvard Square at 8:30pm on Wednesday, November 16th.


Hello From the Xamarin Docs Org!

Hi all, Bryan Costanich here, director of education at Xamarin. I’m totally stoked about what we’re doing with documentation and developer education here at Xamarin, and I want to take you backstage and show you what we’re up to.

AnDevCon II

First things first, next week Wally McClure (one of the co-authors of the MonoTouch book published by Wrox) is giving a talk at the second annual AnDevCon in San Francisco (November 6th-9th) on Mono for Android. Wally’s talk should be awesome, as they always are. Also, Xamarin will have a booth setup there, so if you’re at the convention, come by and say “hi.” Joseph Hill and I will be hanging out.

Training

In addition to AnDevCon, I’m really excited to announce that a couple major training partners have created training based on the Xamarin platform:

  • AppDev has a great new MonoTouch course created by Wally McClure, you can find it here: AppDev.com. Additionally, AppDev has created a slew of video training courses that cover both MonoTouch and Mono for Android which can be found at LearnMobileNow.com.
  • Pluralsight has created a number of courses both for MonoTouch and Mono for Android. You can find them at Pluralsight-Training.net. Additionally, they’re going to be delivering some new training based on iOS 5 in MonoTouch by John Sonmez.

These are really great ways to learn how to write iOS and Android apps, and we’re really proud to have Pluralsight and AppDev in our community.

A View into the Edu Org

Next up, I wanted to give a glimpse into what we’ve accomplished so far, and some of what we have in store for you.

When I signed on at Xamarin, Nat Friedman, our CEO, told me that he wanted the “best doc experience in the industry.” That’s a pretty high bar, as there are some fantastic doc experiences out there. But it’s also a noble goal. The heart of building a successful platform is getting people to use it, and a key to that is providing a path to learning it.

To that end, we’ve been working at break-neck speed at Xamarin to improve our doc story. Some of the things that we’ve been able to accomplish are:

  • Brand New Docs Portaldocs.xamarin.com is the new home of all documentation things Xamarin. We’ve unified the myriad of MonoTouch, Mono for Android, and Mono sites into a single place to find our content.
  • Lots of New Awesome Guides – The first steps with a new platform are always the hardest. Trying to get the lay of the land and figure out how things are done can be daunting without guidance. For MonoTouch, we’ve got a new Getting Started series that goes from a ground-up introduction to MonoTouch through building iPhone and iPad apps using it. Along the way we cover the MVC, the IDE, the SDK, etc. It’s a great series and we’ve had a ton of positive feedback on it. Additionally, we’ve written and published a ton of other guides. We even launched an Introduction to iOS 5 guide on the very day Apple released iOS 5 to the public.
  • Great Hires – It’s impossible to build an amazing team without amazing hires, and we’ve been really lucky on that front. We’ve picked up some amazing writers; Chris Hardy, Mike Bluestein, Craig Dunn, James Bentley, Warren Moxley, and a secret new hire that starts next week. Every single one of these writers has been tremendously influential and luminary in the Xamarin community – in fact, nearly every one has worked on a MonoTouch book! In addition to our killer writer lineup, we’ve got a great intern team, including Jérémie Laval, Alex Rønne Peterson, and Nina Vyedin. Jérémie and Alex have both been awesome Mono contributors that started out in the Google Summer of Code Program, and Nina builds robots.

We’ve also got a number of super awesome things that are coming down the pipe to look forward to, including:

  • Samples Gallery – Currently in alpha, we’re going to be launching a samples gallery very soon that will provide an easy way to find sample code and applications that illustrate how to do various things in MonoTouch and Mono for Android. And best of all, every sample is released via the MIT X11 license, which means that you’re free to use it however you want, even in your commercial applications! You can watch it evolve here, http://docs.xamarin.com/ios/Samples, as we iron out the bugs and wire up the awesome features that are planned for it.
  • Getting Started with Mono for Android Series – The Getting Started series for MonoTouch has been a tremendous model, and we’re working on a Getting Started series for Mono for Android that is going to be, bar none, the best Android content available. Building applications for Android can be an enigmatic experience and we’re working hard to bring you a Getting Started series for Mono for Android that takes the mystery out of Activities, Intents, and Services and makes it possible for everyone to build responsive, reliable Android applications.
  • More Amazing Guides – In addition to the new Getting Started series, we’re producing all kinds of new, amazing guides for both MonoTouch and Mono for Android.
  • API Reference Upgrades – We’ve been working hard on getting our API Reference docs up to snuff. We’ve already launched platform specific API docs (http://docs.xamarin.com/ios/api, http://docs.xamarin.com/android/api, and http://docs.xamarin.com/mono/api), and we’ve got several features that are about to launch including fast API searching, tree synchronization, and more.
  • Awesome New Docs Portal – The docs portal at docs.xamarin.com is just the first baby step to an amazing docs portal. We’re hard at work designing a very sophisticated documentation portal that make finding and browsing Xamarin documentation a breeze.
  • MD Help Upgrades – Of course all work that we’re doing on the docs portal will be translated to the “In-IDE” experience as well. Once we launch the next version of our docs portal we’re going to be making sure that the IDE has just as an amazing experience built in with a new help browser that will give access to the same awesome content available on our portal.
  • Community Integration Features – The Xamarin community of developers is amazing and I’m continuously impressed by the work they’ve done. Having sophisticated community integration features such as community content submission, etc., is going to be a key to being able to tap into that awesomeness and we’ve got a number of cool features being dreamt up to encourage community engagement.

Of course, none of this would be possible without you, our customer, so a big thank you, and I look forward to blowing you away with great new content and features. 🙂

MonoTouch Native Libraries Made Easy

In today’s release of MonoTouch 5.0.1, we’ve made it much, much easier to use native libraries from your C# code.

MonoTouch has always allowed developers to access third-party Objective-C libraries. But in the past, it required some familiarity with the way native libraries work on Unix. It also required both the native library (libMyCuteVisualization.a) and the managed binding (MyCuteVisualization.dll) to be kept in sync.

With MonoTouch 5.0.1, we have solved these problems. If you are binding native libraries, you can now use the LinkWith attribute to declaratively reference the native library as well as the command line options required to use the library.

If you are consuming a native library that someone else has bound, simply reference the managed library from MonoDevelop. That’s it. No more fussing about with extra command-line arguments and dragging libraries around.

We have updated the public MonoTouch Bindings to use the new LinkWith attribute.

Tasty Android Treats

We have a tasty treat for all of our Mono for Android users.

Our new preview for Mono/Android 2.0 has these tasty features:

  • Google Maps APIs!
    You no longer need to write any manual code to bind to Google Maps. The APIs are ready to be used, come and enjoy!
  • We have added Ice Cream Sandwich API support
    This is an extension to our recent addition of the Honeycomb APIs.
  • System.Numerics library has been added to the build
    Mono for Android is the first to ship with System.Numerics. Our upcoming MonoTouch version will also bring BigInteger and Complex data type support in our Mobile profiles.
  • Improved Visual Studio exception support

There are many other improvements in this release. You can test it now in our Beta channel.

For the full details on this release check our release notes.

iCircuit: From Java to iPad in two months

One of the great things about building a developer platform is that you never know how people will use it. We’re always excited to hear a new story about the apps people are building with MonoTouch and Mono for Android.

This week we launched a new home page for MonoTouch, and we were super proud to include a short video of indie developer Frank Krueger talking about his experiences using our platform:

As a solo developer, Frank used MonoTouch to build an incredible app called iCircuit that has been very successful, sells like crazy, and was even featured on iPads in Apple Stores around the world.

Frank’s video turned out so well, and Frank is so passionate about MonoTouch, that some people even asked us if he’s a paid actor! (He’s not — though we’re going to at least send him a bottle of wine for spending a morning in front of a video camera. Thanks Frank!)

It’s hard to capture all the details of Frank’s story in two minutes. And so we decided to create a real, honest-to-goodness case study. We hope you enjoy it, show it to your boss, and use it as a reason to give MonoTouch a try.

If you have a story you want to share with us about using MonoTouch or Mono for Android, or you want to appear in a future video, please let us know!

Xamarin Hero: Frank Krueger and iCircuit

MonoTouch is not just for experienced C# and .NET developers. Windows Mobile developers can easily justify a decision to use Xamarin’s MonoTouch and MonoDevelop to move a Microsoft Windows Mobile or Windows Phone application to an Apple iPhone or iPad. But why would someone fluent in Objective C and the CocoaTouch framework want to travel that route? Frank Krueger, the developer of iCircuit, a digital and analog circuit simulator for the iPad, has an answer.

When the first iPhone was released in 2007, Krueger was taken with Apple’s new device. As soon as the company announced it would accept applications from third-parties, he knew he wanted to participate in what promised to be a fast growing mass market.

Krueger had always thought of himself as a C++ programmer, so that was the language he chose for his first iPhone apps. ”Objective C has this funny mode called C++ mode,” he recalls. “Though it seems stupid in retrospect, I was willing to learn to program the iPhone in C++, but not Objective C.“ He wrote three apps for the iPhone, but as they grew in size the programming became “torture,” Krueger says. And then MonoTouch came along.

MonoTouch Changes the iPhone and iPad Game

The release of MonoTouch completely changed his game, says Krueger. “It was love at first sight.” With MonoTouch, he could replace Objective C and C++ with the high level C# language and the rich class .NET framework libraries. MonoTouch also included C# bindings for all of the CocoaTouch APIs, which, along with MonoDevelop, a free, open source interactive development environment designed for C# and other .NET languages, gave Krueger the syntax checking, debugging, and API help that are familiar to anyone who’s used an IDE.

“C++ and Objective C are fine for doing UI (user interface) implementations, but when it comes to talking to a network or a database that’s where they fall down,” says Krueger. “The iPad and the iPhone are mobile devices. When you use them, all you want to do is talk to databases and the network.” With MonoTouch, he says, it is a breeze to do both thanks to core libraries such as System.XML and System.Net. Developers also get the benefit of C#’s modern language features, including memory management, reflection, type safety, the popular LINQ (Language Integrated Query) library, and most important of all “discoverability, ” the ability to explore the iPhone CocoaTouch APIs through an IDE without having to search Apple’s online documentation. “I realized I wasn’t as good an iPhone developer as I thought I was,” Krueger says. “It took MonoTouch to show me that.”

After creating several “two- to three-screen” iPhone programs for the Apple App Store with MonoTouch, Krueger decided it was time to try something bigger. With a master’s degree in electrical engineering, he had always been intrigued by the free Circuit Simulator Java applet, which its author, Paul Flastad, had written to help students explore the behavior of digital and analog circuits. Krueger wanted to make it work on the newly released iPad. He gave himself three months, the average time it took him to write one of his 99-cent apps.

Java Applet to iPad app in less than two months

Krueger licensed the Circuit Simulator engine from Flastad and then set about building what became iCircuit. He first translated the engine from Java to C#, and then built his UI. The completed application contained 8000 lines of code, split equally between its core logic and its UI. He was done in less than two months. “All thanks to C# and MonoTouch,” he says. “I can’t remember when I wrote such a large app in such a small amount of time. I was basically coding as fast as my fingers could type.”

Support from the MonoTouch team was “mind blowing, stellar,” he says. I think part of my love of MonoTouch is my love of that community.”

Krueger released iCircuit in August, 2010 to positive reviews. By then, the Apple app store contained more than 300,000 apps, but that fall, Apple featured iCircuit on its “Apple in Business” site and the Register named it one of its top 119 must-have apps for admins, coders and geeks.

Today, Krueger is at work on iCircuit versions for the Mac and for Android devices. For the Mac port, he uses MonoMac and for Android he uses Xamarin’s Mono for Android. “The three most popular platforms right now – iPhone and iPad, the Mac, and Android — all have solutions from Xamarin. You come up with a neat app idea, you write your app in a language you love, and then you sell it to people. It’s a great system.”