January 16, 2015

Contest: Show Us Your App!

By

Have you created a beautiful app with Xamarin? Here’s your chance to show the world what you’ve built!

In this contest, you will create a short video showing us the app you have created, how it works, and any other fun details about the development process while building your mobile application.

blog phone pic 2

How to Enter:

  1. Record a short video demoing your Xamarin app
  2. Post your video to the Show Us Your App forum thread
  3. Tweet your video with the hashtags #Xamarin #BuiltWithXamarin

Here is a sample from our own James Montemagno, demoing his Android app “Bike Now”:

Prize:

  • Best App: $100 App Store / Google Play credit to help promote your app!
  • Best Video: $100 App Store / Google Play credit to help promote your app!

All submissions must be made by Monday, February 2nd at 12pm EST. We will evaluate each video and choose the winner based on concept, video quality, and originality. A valid entry consists of a tweet and forum post with a demo video of your personal app. Contestants should follow @XamarinHQ to enable us to DM you for private follow-up. There is no purchase necessary to enter the Show Us Your App Video contest.

TwitterFacebookGoogle+LinkedInEmail
January 15, 2015

Xamarin Event: TechDays 2015 in Paris

By

Join Xamarin at Microsoft TechDays 2015 in Paris, France from February 10-12. Key members from Team Xamarin will be available all three days to answer your questions, discuss your apps and projects, and catch you up on our incredible 2015 roadmap.

Xamarin at TechDays 2015

Mike James, Xamarin Developer Evangelist, will speak about cross-platform development with Xamarin and Xamarin.Forms on Wednesday, February 11th at 11:00am.

Visit us at Booth S67, or schedule a dedicated time to speak with one of our team members.

À bientôt!

TwitterFacebookGoogle+LinkedInEmail
January 14, 2015

New Xamarin Profiler Preview

By

A new Xamarin Profiler preview is available for download today. This release focuses on boosting performance and improving usability. Here’s a rundown of some of our favorite features:

Time Range Selection

Screen Shot 2015-01-08 at 5.38.46 PM

Time range selection lets you highlight an interesting area in the instrument chart and limit the profiling data to a specific time period. Use it to explore a sudden peak in memory usage, keep tabs on performance while your app is running a particular task, or just limit your scope to a manageable amount of data.

Screenshot 2015-01-08 16.44.18

Better Snapshots

Snapshot automation allows you to set the profiler to take snapshots at regular intervals during your profiling session. The snapshots panel also supports rough snapshot comparison, so you can see when memory usage dropped between snapshots (marked in red).

Before memory fix:

Screen Shot 2015-01-09 at 5.18.37 PM

After memory fix:

Screen Shot 2015-01-09 at 5.18.22 PM

And More!

Xamarin.Mac Support – We’ve added initial support for profiling desktop applications built with Xamarin.Mac. Now, your Mac desktop apps can be just as polished as your mobile apps!

Preferences Panel – You can set all your preferences for sampling, snapshots, and more in one place.

Screen Shot 2015-01-09 at 4.25.09 PM

Drag & Drop for Windows – One of our favorite new features is the addition of drag & drop to the Windows version of the Xamarin Profiler. You can load saved files of previous runs by simply dragging and dropping them into the Profiler interface.

Screenshot 2015-01-08 16.44.46

Get it Now

The new Profiler preview is available for download from the Profiler landing page. In addition to the new features, we’ve addressed many customer-reported bugs, issues, and requests. A full list of improvements is captured in the release notes.

Get in touch with our team on the Xamarin Forums and let us know what you think of the new features!

TwitterFacebookGoogle+LinkedInEmail
January 13, 2015

Major Enhancements to Xamarin.Forms

By

Xamarin.Forms is a powerful library that enables developers to build native user interfaces from a shared C# code base for iOS, Android, and Windows Phone. The latest release, Xamarin.Forms 1.3, introduces several major enhancements to the platform to increase productivity and to extend your application even further. Additionally, this release also brings Unified support for iOS applications built with Xamarin.Forms to coincide with the release of Xamarin.iOS 8.6, which is required for this update.

crm-app

Application Lifecycle

It is now easier than ever to respond to application lifecycle events in your Xamarin.Forms applications. With the new Application base class you can tap into several lifecycle methods such as OnStart, OnSleep, and OnResume. The Application class also delivers a simplified solution for specifying your MainPage of your application. Here is an example of what your new Application class might look like:

public class App : Xamarin.Forms.Application
{
    public App ()
    {
        MainPage = new ContentPage { Title = "App Lifecycle Sample" }; // your page here
    }
    protected override void OnStart()
    {
        // Handle when your app starts
        Debug.WriteLine ("OnStart");
    }
    protected override void OnSleep()
    {
        // Handle when your app sleeps
        Debug.WriteLine ("OnSleep");
    }
    protected override void OnResume()
    {
        // Handle when your app resumes
        Debug.WriteLine ("OnResume");
    }
}

Be sure to read through our Xamarin.Forms Application Lifecycle documentation on how to get started using or transitioning your app to take advantage of these new events.

Styles

Xamarin developers love that they are able to use XAML to declare their user interfaces across iOS, Android, and Windows Phone. However, the immense amount of properties on controls can make your XAML cluttered. Additionally, if you wanted to change the look across all of your controls, you had to update each and every control. The introduction of Styles alleviates this issue by allowing you to define control defaults, known as styles, in your ResourceDictionary. Here is an example of what a few buttons might look like on a page:

<!--?xml version="1.0" encoding="UTF-8"?-->
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
	     xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="StylesApps.MyPage">
  <ContentPage.Content>
    <StackLayout Padding="10" Spacing="10">
      <Button Text="Login"
              HorizontalOptions = "FillAndExpand"
              HeightRequest = "42"
              BackgroundColor = "#77d065"
              BorderColor = "Black"
              BorderRadius = "5"
              BorderWidth = "0"
              TextColor = "White"/>
      <Button Text="Logout"
              HorizontalOptions = "FillAndExpand"
              HeightRequest = "42"
              BackgroundColor = "#77d065"
              BorderColor = "Black"
              BorderRadius = "5"
              BorderWidth = "0"
              TextColor = "White"/>
      <Button Text="Register"
              HorizontalOptions = "FillAndExpand"
              HeightRequest = "42"
              BackgroundColor = "#77d065"
              BorderColor = "Black"
              BorderRadius = "5"
              BorderWidth = "0"
              TextColor = "White"/>
    </StackLayout>
  </ContentPage.Content>
</ContentPage>

You can see there are a lot of properties that are the same across all of these buttons. To clean this up, you simply need define a base style in the ContentPage’s Resources, and then set the Button’s Style property to the Key.

<!--?xml version="1.0" encoding="UTF-8"?-->
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
			xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
			x:Class="StylesApps.MyPage">
  <ContentPage.Resources>
    <ResourceDictionary>
      <Style x:Key="ButtonStyle" TargetType="Button">
         <Setter Property="HorizontalOptions" Value="FillAndExpand"/>
         <Setter Property="BackgroundColor" Value="#77d065"/>
         <Setter Property="BorderColor" Value="Black"/>
         <Setter Property="HeightRequest" Value="42"/>
         <Setter Property="BorderRadius" Value="5"/>
         <Setter Property="BorderWidth" Value="0" />
         <Setter Property="TextColor" Value="White"/>
      </Style>
    </ResourceDictionary>
  </ContentPage.Resources>
    <ContentPage.Content>
      <StackLayout Padding="10" Spacing="10">
        <Button Text="Login" Style="{StaticResource ButtonStyle}" />
        <Button Text="Logout" Style="{StaticResource ButtonStyle}"/>
        <Button Text="Register" Style="{StaticResource ButtonStyle}"/>
      </StackLayout>
  </ContentPage.Content>
</ContentPage>

Now, adjusting any of the properties in the style will automatically apply to all of the buttons on the page that have this style set.

Styles

Triggers

There are several types of triggers now available in Xamarin.Forms including event, data, and multi triggers. If you have never heard of a trigger in styling before, they are essentially objects that enable you to apply changes when certain conditions are met on a control. For instance, you may want to scale up an Entry field when it has focus and also turn the text green. The code to implement this is as simple as extending the Style for a control in the resources. When the trigger’s property is met, the setter will be executed automatically. When the trigger’s property is not met, or changes, the setters will be returned to their original values.

<!--?xml version="1.0" encoding="UTF-8"?-->
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="StylesApps.MyPage2">
  <ContentPage.Resources>
    <ResourceDictionary>
      <Style x:Key="EntryTrigger" TargetType="Entry">
        <Style.Triggers>
          <Trigger Property="IsFocused" Value="True" TargetType="Entry">
            <Setter Property="Scale" Value="1.1" />
            <Setter Property="TextColor" Value="Green" />
          </Trigger>
        </Style.Triggers>
      </Style>
    </ResourceDictionary>
  </ContentPage.Resources>
  <ContentPage.Content>
    <StackLayout Padding="20" Spacing="10">
      <Entry Placeholder="Username" Style="{StaticResource EntryTrigger}" />
      <Entry Placeholder="Password" Style="{StaticResource EntryTrigger}"/>
      <Button Text="Login" />
    </StackLayout>
  </ContentPage.Content>
</ContentPage>

Xamarin.Forms Triggers

Navigation Stack

The navigation system in Xamarin.Forms has also been overhauled in 1.3 to enable you to push, pop, and insert pages easily. In addition you can now specify whether you would like to animate pages in and out during navigation. Here is a look at the new INavigation API:

public interface INavigation
{
    IReadOnlyList NavigationStack { get; }
    IReadOnlyList ModalStack { get; }
    void RemovePage (Page page);
    void InsertPageBefore (Page page, Page before);
    Task PushAsync (Page page);
    Task PopAsync ();
    Task PopToRootAsync ();
    Task PushModalAsync (Page page);
    Task PopModalAsync ();
    Task PushAsync (Page page, bool animated);
    Task PopAsync (bool animated);
    Task PopToRootAsync (bool animated);
    Task PushModalAsync (Page page, bool animated);
    Task PopModalAsync (bool animated);
}

Xamarin.Forms navigation

In addition to these updates you will also find a new virtual method on any of your Pages: OnBackButtonPressed(), which allows you to tap in to find out when the physical back button was pressed on the device. Combining these updates together give you much more flexibility when building your application.

So Much More

These features are just the beginning of everything packed into Xamarin.Forms 1.3. You can read about the plethora of features and fixes in this release on the Xamarin Forums. Additionally, you will find new additions and updates to our comprehensive documentation on our developer portal to help you get started with this release.

*Note: Versions 1.3.0 and 1.3.1 have identical APIs except that the latter has support for the Unified API in Xamarin.iOS 8.6.

Learn More Live

To see Xamarin.Forms 1.3 in action covering these new features and many more, join Xamarin’s Craig Dunn for a live webinar on Thursday, January 29th at 11am EST.
 

Register Now

 

TwitterFacebookGoogle+LinkedInEmail
January 12, 2015

Xamarin.iOS Unified API with 64-bit Support

By

64bit-150x150We are pleased to announce that Xamarin.iOS 8.6, featuring the Unified API, has been released and is available in the stable channel. The entire team has been working hard on this release for over a year to bring you the Unified API with 64-bit support. Please note that Apple announced two important deadlines for when your app must include 64-bit support:

  • February 1st: New iOS app submissions
  • June 1st: All new and existing iOS app submissions or updates

Updated Components and Libraries

We are rolling out updates for official Xamarin Components and NuGet packages with support for the Unified API. If you are a library creator and have not updated your component or NuGet package yet, please do so as soon as possible so that app publishers have time to migrate and test apps before Apple’s February 1st deadline.  Check out Matt Ward’s blog post on how to update your library for the new Unified API.

Get Started Today

You can begin migrating your apps today by using our built in migration assistant for both Xamarin Studio and Visual Studio. If you need more guidance on migrating your app to the Unified API, make sure to read through our full guide on our documentation site, or check out this Xamarin University Lightning Lecture.

Live Webinar Recording

If you’d like to see migration in action, we have the recording of Xamarin Evangelist Mike James’ webinar “Migrating Apps to the Unified API and 64-Bit” here, including an extended Q&A.

TwitterFacebookGoogle+LinkedInEmail
January 9, 2015

Xamarin Test Cloud Video Series: Uploading Test Scripts and Viewing Mobile Test Results

By

In prior videos in this series, we provided a high-level overview of Xamarin Test Cloud and how to create automated mobile tests in C# using Xamarin.UITest.

In this episode, Dan Waters shows us the process of uploading C# UITests to Xamarin Test Cloud, selecting devices to test, viewing test results, and identifying and diagnosing test failures. Watch it in full-screen to see the code and test results.

Xamarin Test Cloud is different from other industry solutions in several ways. Tests are script-based, where test authors query for visual elements and conditions, rather than remoting solutions which just provide remote access to a device. Our scripting approach is also different from optical character recognition (OCR) solutions which are image-based, breaking easily if visual elements move based on a designer’s input or when testing against different form factor and device sizes.

UITest Screenshot 

The Xamarin Test Cloud web portal also provides comprehensive visual reports, easily comparing visual results from hundreds of devices, all synchronized to the same step in test test case. The side-by-side views help developers and testers identify visual layout bugs that can occur on different device sizes, form factors, and portrait/landscape orientation.

TestCloudReportWhen errors do occur, Xamarin Test Cloud makes it easy to identify and diagnose the issue, providing memory and CPU usage, test duration, logcat output, as well as detailed exception information.

When To Test?

Perhaps the most important decision is knowing when to start using Xamarin Test Cloud in your development process. We are strong proponents of doing this as early as possible. Like Test Driven Development (TDD), building mobile tests as you build features or new screens eventually provides a robust testing library to test all features, enabling earlier identification of bugs when they’re easier to fix, rather than later when it can potentially delay a release, or in the worst case scenario, having your users find bugs and either rate your app poorly or stop using it altogether.

Learn More & Get Started

To learn more about Xamarin Test Cloud, visit the product page, or check out our developer documentation and whitepaper on why mobile quality matters.

TwitterFacebookGoogle+LinkedInEmail
January 8, 2015

Amazing Community-Built Plugins for Xamarin

By

Over the holidays we challenged our community to create some brand new plugins for Xamarin that would not only help other developers add new features to their mobile apps easily, but also entitle the plugin creator to a spectacular Xamarin Swag Bag! Our amazing developers in the community stepped up in a big way and created over twenty brand new plugins that range in functionality from maps and notifications to new controls for Xamarin.Forms. Here are some highlights:

Messaging

MessagingLargeLooking to make a phone call, send a SMS, or even an e-mail from your shared code? Carel Lotz’s Messaging plugin has you covered across all of your Xamarin and Windows apps.

Device Motion

device_motionIf you need access to device sensors such as the accelerometer or gyroscope, be sure to grab Rendy’s Device Motion plugin that features a simple cross-platform API.

Lamp

Lamp_nuget_iconPhill’s simple but elegant Lamp plugin for Xamarin enables you to turn a device’s LED off and on with a simple cross-platform command.

Sockets

plugin_icon_socketsIf you’re like me, then you’ve probably had fun messing around with TCP and UDP listeners and clients in a few of your apps. Ryan’s brand new Sockets plugin now handles all of your sockets needs from shared code, and even includes UDP multicast!

Xamarin.Forms Plugins

plugin_icon_nugetIn addition to all the great cross-platform plugins that were created, there were also a few Xamarin.Forms specific plugins and controls developed over the holidays. Here are a few: store rating plugin, SVG control, toast notifications, compass, and barcode scanner.

So Many More!

battery_icon (1)The plugin extravaganza doesn’t stop with the plugins featured here; just search for “Plugin for Xamarin” on NuGet to browse all of the other entries and plugins that you can use in your Xamarin mobile apps.

We want to thank everyone that created a brand new plugin over their holiday break and will be contacting you directly through Twitter and GitHub so you can claim your prize.

Keep the Plugins Coming

An exciting aspect of creating your first plugin is that you also get to learn new skills and tools such as NuGet and GitHub. Our Visual Studio Templates for Plugins and Google+ Hangout walkthrough help simplify the entire process and provide a great starting point so that anyone can create plugins for Xamarin.

If you didn’t have a chance to enter during the holiday contest, don’t worry! We still want to thank any developer that creates a new plugin for Xamarin in the month of January with some Xamarin goodies (while supplies last). Once you have published your plugin on NuGet, simply email us at plugins@xamarin.com. We can’t wait to see what you build!

TwitterFacebookGoogle+LinkedInEmail
January 6, 2015

Update on Xamarin.iOS Unified API Release Plans

By

In December, we announced that our Unified API, which brings 64-bit support to our Mac and iOS products, would be released to stable on January 5th to accommodate Apple’s requirement that apps must be built with 64-bit support beginning February 1st. However, based on Apple’s mid-December announcement that published apps may continue to submit 32-bit-only updates until June 1st, we made the decision to push the stable release of our Unified API to next week. This will enable us to fully incorporate feedback from you to ensure the highest quality developer experience.

Migration

Migrating to the Unified API is simple, and even the most complex apps should not take more than a few hours to migrate your source code. Customers can begin migrating their apps next week, when the Unified API has been released to stable, along with Unified API updates to Xamarin.Forms and all of the Xamarin-maintained Components in our Component Store. If you are a library developer, or are just interested in getting a head start with Unified API, you can grab the release currently in our Beta channel and get started updating your libraries and apps today. For some guidance on migrating your app to Unified API, please check out the full guide on our documentation site, or check out this Xamarin University Lightning Lecture:

TwitterFacebookGoogle+LinkedInEmail
January 2, 2015

Jump Start the New Year with Xamarin!

By

Get ready to kick this new year into gear with all of the upcoming Xamarin events happening this month! Stay in tune by following @XamarinEvents posts on Twitter and be sure to check out our Events forum with new events being added daily from all around the world!

Here are some upcoming Xamarin developer group meetups:

Xamarin Developers Michigan (XamarinA2) us

  • Ann Arbor, MI: Wednesday, January 7th 7:00pm
  • Using Xamarin Studio with Mac or Linux to Provide Cross-Platform Applications

NYC Mobile .NET Developers Group us

  • New York, NY: Tuesday, January 13th 6:45PM
  • App Showcase [2]: Show and Tell

Arizona – Xamarin us

  • Tempe, AZ: Thursday, January 15th 6:00pm
  • Xamarin.Forms & Push Notifications – Michael Kniskern

Boston Mobile C# Developers’ Group us

  • Boston, MA: Thursday, January 15th 6:45pm
  • Building Your First Android Wear App

XL Soft us

  • Tokyo, Japan [日本]: Thursday, January 15th 7:00pm
  • Japan Xamarin User Group Event & New Year Celebration

Thessaloniki .Net Meetup us

  • Thessaloníki­, Greece: Friday, January 16th 7:00pm
  • Entity Framework: From novice to advanced.

Madison Mobile .NET Developers Group us

  • Madison, WI: Wednesday, January 21st 5:30pm
  • Shining Some Light on Xamarin.Forms and MVVM Light Toolkit

Houston Xamarin C# Mobile Developers Group us

  • Houston, TX: Wednesday, January 21st 6:30pm
  • Beacons! Beacons! Beacons!

Cape Town Xamarin Users Group (@CTXUG) us

  • Cape Town, South Africa: Thursday, January 22nd 5:30pm
  • Xamarin User Group Event

Denver Mobile .NET Developers Group us

  • Denver, CO: Monday, January 26th 6:30pm
  • Let’s talk about Xamarin/Couchbase integration

Didn’t see your city listed above? Not to worry, look to this January Announcements forum for even MORE upcoming Xamarin events, meetups, and presentations happening every day!

TwitterFacebookGoogle+LinkedInEmail