August 19, 2014

Major Xamarin.Mac Updates

By

We are happy to announce a few major updates to Xamarin.Mac. The first major update is the result of more than a year of development on our API bindings and Mono’s runtime which brings the following features to Xamarin.Mac:

  • 64-bit support
  • New 64-bit Frameworks
  • Support for lighter mobile profile
  • Easier code sharing between Mac and iOS

These features are available today in the Beta channel.

Yosemite OS X Logo On top of these new features we have been hard at work binding the new Mac OS X Yosemite APIs. We are pleased to announce support for Yosemite is now available. Since Yosemite is still an unreleased platform and may continue to change you will find these APIs in the Alpha channel along with all of the other features I mentioned earlier.

64-bit support & Easier Code Sharing

We recently announced the brand new Unified API for Xamarin.iOS and Xamarin.Mac. The Unified API allows developers to support both 32 bit and 64 bit applications with the same source code (as well as binaries) on both Mac and iOS.

In addition to this we also took the time to enhance the code sharing story between iOS and Mac. An example of this is that you no longer are required to add any namespace prefixes. This means code that looked like this:

#if MAC
using MonoMac.Foundation;
#elif IOS
using MonoTouch.Foundation;
#endif

Can now simply be written in one line:

using Foundation;

For more information, read our new Guides for Cross Platform Mac and iOS code.

New 64-bit Frameworks

With the introduction of our Unified API we are finally able to support all of those 64 bit-only frameworks that Apple has introduced in the last few years, including but certainly not limited to the many new 64 bit-only frameworks in Yosemite.
What's new in scene kit

Shadows in Scene Kit

Lightweight Profile

Also with the Unified API comes the ability for users to adopt Xamarin’s Mobile profile. The Mobile profile is the same API profile that we use on Android and iOS which has been designed to be linkable and have a much smaller footprint on disk than the regular desktop edition. This is convenient for applications going into the AppStore or that wish to share more code across Android and iOS.

Samples!

Many of our Mac samples are being ported to the Unified API and currently live in their own branch. In addition, we are starting to publish our internal ports of the Yosemite samples which can be found in the Yosemite directory.

TwitterFacebookGoogle+LinkedInEmail

Unified API with 64-bit Support for iOS and Mac

By

Today we are pleased to share some major improvements to the APIs for our iOS and Mac products.

ios and osx logos

Why a new API?

The Classic Xamarin.iOS and Xamarin.Mac APIs had two major flaws:

  1. They did not support 64 bit applications.
  2. They made iOS and Mac code sharing cumbersome.

As Mac OS X evolved, more and more frameworks became available only as 64 bit frameworks. Additionally, iOS recently made the 64-bit jump when the iPhone 5s was launched.

Last year we started a redesign for our 64-bit support, one that would meet the following goals:

  1. The same source code must work on both 32 and 64-bit platforms
  2. Libraries and binaries would run either in 32 or 64 bit modes, depending on the host platform and build settings, with no source code changes or recompilation required
  3. Improved code sharing story between our Mac and iOS products.

Enter The Unified API

The result of more than a year of development on our API bindings and Mono’s runtime is our Unified API, which we are introducing today as a preview feature. The Unified API accomplishes everything we set out to and so much more.

First, we addressed the 32/64 bit split, by surfacing an API that is 32/64 bit agnostic.

Second, we dropped the namespace prefixes. This makes sharing code between iOS and Mac apps less tedious to maintain and easier on the eyes. An example to demonstrate this is what you had to do before when you had to use a using:

#if MAC
MonoMac.Foundation;
#elif IOS
MonoTouch.Foundation;
#endif

With the Unified API you can simply use:

Foundation;

64bitThis means with the new Unified API we have not only made it easier to share common code across your iOS and Mac applications, but you are now able to take advantage of all of the new 64-bit APIs on each platform.

Get Started & Backwards Compatibility

The new Unified API is available now in the Beta channel. We made the new Unified API opt-in, which means there is no need to upgrade to this new API unless you want to take advantage of the features outlined above. Xamarin will continue to support the Classic API you are familiar with for both Mac and iOS alongside the Unified API indefinitely.

We have ported all of our Mac samples and our iOS samples to the new API so you can see what is involved. They are both maintained on a branch that for historical reasons is called “magic-types”.

We are currently working on both templates to get you started (or you can migrate on your own), as well as a migration assistant that will do the bulk of the port for you.

What is Missing?

We are aware that the following features are currently missing and we are working on them:

  • Binding Project Types, to easily call into native libraries
  • Complete templates for all the scenarios previously supported
  • Xamarin’s Components are not available yet
TwitterFacebookGoogle+LinkedInEmail
August 14, 2014

Android L Developer Preview & Android Wear Support

By

Today we have published support for Google’s Android L Developer Preview in the Alpha channel. Additionally, we are introducing preliminary support for new SDKs that Google has released, including Android Wear, Android TV, and brand new Support Libraries.Android Robot

Installing our Android L Preview

  • With this release, a Java JDK 1.7 is now required to properly compile applications. You can download one for your system from Oracle website.
  • Update your Android SDK Tools to 23.0.2 from the Android SDK Manager
  • Install Android SDK Platform & Build-tools to 20

Android SDKTools

  • Download the Android L and Android 4.4W SDKs

Android L Preview SDK Download

Android Wear

Android WearWhen Google announced their new wearable platform, Android Wear, last March, they only made a new library for enhancing existing notifications available.

At Google I/O, an official developer SDK to create full-featured applications capable of running on an Android Wear device was unveiled. With this release, Xamarin developers will now enjoy the same ability.

We are also making available the Android Wear UI Library preview on NuGet to include in your wearable apps. Our Android Support Library v4 was also updated to include many of the new Android Wear interaction APIs, such as NotificationCompat and RemoteInput.

Android Support Libraries

Not only did the Android L Preview come in with a new series of core APIs, it also brought a large update to the Android Support Libraries set.

Along with Android Support Library v4 updates, additional Support Libraries are now in preview release, including great new features such as RecyclerView, CardView, Palette, Android TV Leanback, and update to Support Library v13. All of these libraries are now available straight from NuGet.

IDE Improvements

We have also added some new features to help you design for those new platforms to our Android designer for both Xamarin Studio and Visual Studio. You’ll find Wear device support, Material theme selection, and Action Bar previewing, among others, starting today.

Android Wear Designer support

See the Xamarin Studio release notes for more information and known caveats.

Getting Started

You should have the new APIs available now. Check our release notes for more details and a detailed list of the new APIs.

TwitterFacebookGoogle+LinkedInEmail

Tom Hanks’ Vintage-Typewriter Inspired Hanx Writer App

By

The Hanx Writer app, built with Xamarin, was released today after several months of work. I had the great pleasure to get the scoop on what it took to build this nostalgia-inducing app from a very cool developer at Xamarin Premier Consulting Partner, Hitcents.
HanxWriterKeyboardCropped

Jonathan Peppers is a Xamarin MVP, Senior C# Developer and App Specialist at Hitcents, and will be speaking about in-app purchases, piracy protection, localization, culturalization, and more in his, “If You Can Ship Your app in China, You Can Ship it Anywhere,” talk at Xamarin Evolve this October. Here are some questions from my Q&A session with Jonathan:

Can you please describe the app and how you got the idea?

Jonathan Peppers

The app is called “Hanx Writer.” That’s Hanx, with an “X”, but sounds like Hanks as in Tom Hanks. An agency that represents a lot of celebrities contacted Hitcents on behalf of Tom Hanks, who has an interest in collecting vintage typewriters, but also regularly uses an iPad. He wanted an app that made him feel like he was using a typewriter; he wanted that nostalgic feeling, but to still have the app function as a word processor to send emails, write letters, that sort of thing. So, we built an app that feels, looks, and sounds like a real typewriter for iOS.

How long did it take you to develop it?

It’s been about 5 months. But a lot of that time was refining and I was not working full time on this. My younger brother, Nick Peppers, also worked on the app. He did the iOS layouts and some of the UI stuff. There were 2 of us that committed code, and we also have a designer, Adam Diestelkamp, to do the cool graphics and a 3D artist, Matt Lester, do some of the 3D Models.

Tom Hanks basically said, “I want an app like this,” and you wrote it?

Yes, basically. He really just had the concept for the app, but our team took the idea and had to figure out how to translate the typewriter onto a flat screen. What things do we make like a real typewriter? What things do we make like a word processor? People are used to doing a copy and paste, so we didn’t want to get in the way of that. People know how to use word processing, but we still want to provide that cool vintage feel.

HanxWriterManageDocuments
Do you see going to other platforms besides iOS?

That was one of the reasons we chose Xamarin. We now have the option to share code with other platforms, so we’ll look at iPhone next and see if it makes sense there, and Android after that.

What API’s are you using?

We used iOS TextKit for entering text and saving. You can also go beyond the end of the page, and you can copy and paste and it splices it by page automatically and word wraps. There is a lot of text processing work going on in this app.

There are many items in the app that move around, the page flips in and out, and the keys dip when pressed. The keys need to look just like a real typewriter key when pressed down, for example. I use a lot of CoreAnimation for these effects.

I also used NSKeyedArchiver to save and read rich text.

Did you use Shared Project or Portable Class Library (PCL)? Why?
HanxWriterWirelessKeyboard
Parts of the app are in a PCL. We are using MVVM so all of our View Model classes are in a PCL. The app does have a lot of native iOS API calls, so these are not in the PCL. I prefer PCL over Shared Projects. I just get a better feeling passing around the same DLL that I know always works. I feel #IF can easily be abused with a developer using it too freely.

Anything else you want to tell us about your app and the experience?

It was definitely a cool app to work on. In the beginning, we tried to get a solid concept. All we knew is we were trying to make a typewriter. We really re-iterated and prototyped and added some different concepts along the way. It was fun to work on and I think it was a great choice to use Xamarin because we were able to complete development quicker.

To learn more about Hanx Writer, join @TomHanks for a live Twitter Q&A online this morning:

And to learn more about building apps with Xamarin, come see Jonathan Peppers present at Xamarin Evolve 2014.

TwitterFacebookGoogle+LinkedInEmail
August 13, 2014

Pack Xamarin in your Cardboard

By

Virtual Reality is a hot topic these days and is viewed by many as the platform of tomorrow in some fields, like game development.

cardboard-xamarin

At this year’s Google I/O conference, among the flurry of product announcements, Google presented an interesting project called Cardboard. The experiment sprouts from a desire to make virtual reality, as popularized by devices like the Oculus Rift, more accessible to everybody. The result is a simple, affordable, and open virtual reality headset based on off-the-shelves parts that uses an Android phone for the heavy lifting of sensors, computation, and display.

Thanks to our newly released Google Cardboard component, Xamarin.Android developers can now also create virtual reality applications that work on the Cardboard platform.

Be sure to check out the included CardboardMonkey app for an example of a simple game that takes advantage of the immersive nature of the platform:

xamarin-cardboardmonkey

You can visit the official Cardboard website for instructions on how to build your own Cardboard shell. Alternatively, pre-assembled versions are available from several online retailers.

You can also head to the Google Developers website for more details on the Cardboard API.

TwitterFacebookGoogle+LinkedInEmail
August 12, 2014

Introducing CocosSharp

By

Today we are introducing CocosSharp a cross-platform library for building 2D games.

CocosSharp blends the power of the Cocos2D programming model with C# and the .NET Framework. Developers familiar with Cocos2D will feel right at home with CocosSharp, as the API has been designed to follow C# and .NET idioms.

NuGet

We wanted to make CocosSharp easy to adopt in your application, so we created NuGet packages that are available both on Visual Studio and Xamarin Studio. Our NuGet packages come with Portable Class Libraries, allowing developers to build portable class library components on top of it, or build their game logic in a portable class library and reuse the code across all platforms, including iOS, Android, Mac, Windows Desktop, Windows Store and Windows Phone.

Samples

To get you started, we have provided many sample programs; in particular, check out Angry Ninjas:

AngryNinjas

Open Source

CocosSharp is an open source library and is built on top of the MonoGame engine and the fine work from the Cocos2D, Cocos2D-x and Cocos2D-XNA communities. We took those efforts and improved upon them.

Learn More at Evolve

Join us for Xamarin Evolve 2014 in Atlanta, Georgia this October, where we’ll have several sessions covering game development in C#, including Mike Bluestein’s talk, CocosSharp: C# Games that Run Everywhere. Check out the Xamarin Evolve 2014 site to learn more.

CocosSharp and Xamarin Indie

CocosSharp is available in all Xamarin Subscriptions, including our Xamarin Indie plan. Sign up for Xamarin Indie in August to take advantage of our $25 month-to-month pricing experiment, and start building games with Xamarin and CocosSharp today.

Discuss CocosSharp in the Xamarin Forums

TwitterFacebookGoogle+LinkedInEmail
August 11, 2014

Xamarin University at Evolve 2014

By

Xam UWe’re excited to be bringing an intensive 2-day boot camp version of Xamarin University to Evolve 2014. We’ve been hard at work putting together the curriculum and labs, and we think you’ll love it. Training at Evolve will be a hearty mix of lectures and hands-on lab time, with Xamarin professors and experts there to answer questions, offer guidance, and troubleshoot with you.

This year we’re going to have two different tracks, a dedicated Fundamentals track, and an Electives Track that have various Focuses that offer themed instruction on various areas.

Fundamentals Track

Get a jumpstart on building cross-platform mobile apps with this Xamarin.Forms-based course targeted at brand new mobile developers. The Fundamentals track is two days of linear training designed to get new developers up and running quickly. At the end of this track, you’ll have a solid mobile development foundation targeting all three mobile platforms of iOS, Android, and Windows Phone. This track includes:

  • Mobile App Basics
  • Cross-platform Mobile Development
  • Xamarin.Forms Basics
  • XAML in Xamarin.Forms
  • Listviews
  • Navigation
  • Data
  • Integrating Web Services
  • Extending Xamarin.Forms
  • Publishing your App

Electives

If you already have a solid grasp on the fundamentals with Xamarin, but want to hone your skills on particular facets mobile development, the Electives track is for you. The Electives Track is split into curated sets of themed classes or focuses, meant to give you a deeper understanding of skills in a particular area. There are 6 focuses total, and each focus is a whole day of deep dive training on:

  • Xamarin.Forms: Intro through Advanced, including XAML, Databinding, Customizing Listviews, Navigation, and Extending Xamarin.Forms
  • Testing: Comprehensive Mobile Testing including Testing Lifecycle and Best Practices (Unit Tests + UI Acceptance Testing), C# Tests with UITest, Continuous Integration, Test Cloud Automation, and more.
    Enterprise – Security, Enterprise WCF Integration, Data Caching, Salesforce.com Integration, Azure, Dropbox, and more.
  • Cross-platform Development: Patterns and recommendations for maximizing code sharing across platforms, Xamarin.Mobile and Auth, Internationalization and Localization, Building Xamarin Components, Memory Management, and Publishing Apps.
  • iOS or Android Deep Dive: Two focuses that allow you to dive deep into native platform APIs for: UI Development, Handling Fragmentation, Touch, Navigation, and Backgrounding.

Each focus is an entire day of training, so you can choose two focuses to deep dive on.

Pre-Evolve Access to Xamarin University

In addition to the 2 days of intense training at Evolve, we’re giving all Evolve Training Ticket holders access to the fundamentals classes in Xamarin University a month prior to Evolve. So, if you’re itching to get an early start, or are new to mobile development but still want to be able to take the Focus Electives, you can run through the fundamental classes in Xamarin University before Evolve!

TwitterFacebookGoogle+LinkedInEmail
August 8, 2014

Contest: Favorite Xamarin Studio Feature

By

With recent updates to Xamarin Studio and the introduction of very affordable $25 per month Xamarin Indie subscriptions, more developers than ever are finding out just how fast, easy, and fun mobile development with Xamarin Studio can be.

XamarinStudioDocumentWindow

Floating Editor Windows!
In this contest, we’re asking developers to help fellow developers discover all of the amazing features that Xamarin Studio has to offer. Maybe your friends online don’t know about the integrated Xamarin Designer for iOS and Android, source code analysis, or universal search and code navigation features Xamarin Studio includes. Or perhaps you haven’t had a chance to try out some of the key enhancements we recently introduced, including side-by-side editing and NuGet integration, and were looking for an excuse to take a deep dive yourself.

How To Enter:

It is simple to enter, just give mobile development a try in Xamarin Studio and write a blog post about your favorite features of Xamarin Studio. Then enter the contest by sharing your post on Twitter or Google+ with the hashtag #XamarinStudio.

The more details and screenshots you can share the better. Here is an example where Xamarin’s own James Montemagno blogged about his top 3 features, but we want to know what yours are.

Prizes:

Grand Prize: 6-Month Xamarin Indie Subscription for iOS and Android
All Valid Entries: Exclusive Xamarin Swag Bag

You can get started using Xamarin Studio for iOS and Android development with a free 30 day trial, and when you are ready to ship your app you can upgrade to a monthly subscription to Xamarin Indie for just $25 a month.

All submissions must be made by August 18th at 8am EDT. A valid entry consists of a Tweet or public Google+ post with #XamarinStudio and link to your blog post containing original content. Contestants should follow @XamarinHQ to enable us to DM you for private follow-up. There is no purchase necessary to enter the Favorite Xamarin Studio Feature contest.

TwitterFacebookGoogle+LinkedInEmail

Code Monkeys in the Wild Contest Winners!

By

Xamarin plush monkeys serve as an example of how big the Xamarin community stretches all over the world. In the latest contest, Code Monkeys in the Wild, we wanted to see what your plush monkey was up to. Choosing was a tough choice, as there were many great entries that ranged from the Swiss Alps to Rhode Island.

Thank you to everyone who participated! Below are some highlights of some entries, and  you can check out the rest of the Code Monkeys in the Wild photos here.

CodeMonkeys2

The winner for Best Monkey and an Exclusive Xamarin Swag bag goes to Bruno Pacola from Brazil! Bruno’s monkey sure has a relaxing lifestyle:

As for the Best Virtual Monkey, and winner of an Exclusive Xamarin Swag Bag PLUS a plush Xamarin monkey, goes to Russell Collingham from England! 

Thank you to everyone who participated in the Code Monkeys in the Wild contest! It’s always amazing to see our Xamarin community around the world. If you didn’t manage to get an entry submitted this time, no worries; keep an eye on the Xamarin Blog for future contest announcements!

TwitterFacebookGoogle+LinkedInEmail
August 6, 2014

Tips for Winning a Xammy

By

Xamarin App Developers, mark your calendars: Monday, August 11, 2014 is the deadline to enter your app for consideration in the Xamarin Evolve 2014 Xammy Awards. After that deadline, two apps in each of four major categories – Gaming, Enterprise, Emerging Devices, and Consumer – will be selected as Xammy finalists. If chosen, we will showcase your app on stage at Xamarin Evolve 2014.

Xammy winning logo

There’s no doubt the competition will be fierce! Here are a few tips on how to make it to the brass ring:

  1. Be Transformative: Mobile technology is changing the world. Tell us how your app is enabling new kinds of customer engagement, distributed workforce efficiencies, or further massaging the flow of data. Show us how your app is reshaping the way we connect, work and play.
  2. Be Innovative: The intense competition between platform vendors is greatly accelerating innovation. Explain the differentiating capabilities your app brings to customer interactions or business processes.
  3. Be Revolutionary: Tell us how your app significantly changed your audience’s behavior or how they engage with information.
  4. Be Versatile: It’s a BYOD world. Share with us how your app is compatible with various smartphones, tablets, and wearables. Describe to us which Xamarin native capabilities your beautiful app employed on different platforms.
  5. Be Descriptive: There are so many great tools available to Xamarin developers – don’t leave a single detail out. Whether you used the new Xamarin Designer for iOS, accelerated development with Xamarin Components and NuGets, or built the entire UI in Xamarin.Forms, tell us absolutely everything about it!

Category winners, as well as a Grand Prize winner and a Developers’ Choice winner, will be announced live on October 10th at Xamarin Evolve 2014.

Does your app have what it takes to be recognized worldwide as a Xammy Award winner? Enter your Xamarin app to find out! Don’t miss the submission deadline of August 11, 2014.

TwitterFacebookGoogle+LinkedInEmail