May 26, 2015

IBM and Xamarin Partner to Simplify Secure Enterprise Mobility

By

IBM MobileFirst Protect LogoLast October, we announced a strategic partnership with IBM MobileFirst. Today, we’ve expanded our partnership to include industry-leading Enterprise Mobility Management (EMM) with IBM MobileFirst Protect.
 
The growth in mobile apps brings substantial opportunities to the enterprise, but also comes with significant risks, including: loss of data through device theft, employee misuse, or targeted attacks. With an increasingly mobile workforce, and employees’ ability to access company information from anywhere at anytime, companies must ensure their mobile strategy includes safeguards for data breaches and security threats.
 
We’ve established interoperability with IBM MobileFirst Protect to provide our customers with more comprehensive methods for securely delivering high quality native iOS and Android apps. This capability allows enterprises to wrap their Xamarin apps and leverage IBM MobileFirst Protect capabilities, such as: requiring an application PIN when using the protected application, jailbreak detection, and using MobileFirst app tunneling for secure access to corporate data. Additionally, IBM MobileFirst Protect can insulate enterprises with data loss prevention (DLP) in their mobile apps by restricting users’ ability to cut/copy/paste, print, or using “open in” functions outside of whitelisted apps.
 
Protect your Xamarin apps with IBM MobileFirst Protect in three easy steps:

  1. Build your Xamarin app.
  2. Upload the iOS and Android app packages to IBM MobileFirst Protect for containerization and configuration of security policies.
  3. Distribute and manage apps through the IBM MobileFirst Protect portal.

 
For more information about Xamarin and MobileFirst Protect, please visit xamarin.com/ibm.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Introducing the Xamarin Podcast

By

Today, I’m excited to announce a new season of the Xamarin Podcast. The Xamarin Podcast makes it easier, and more enjoyable, to learn everything new in the world of C#, .NET, and mobile development. Be sure to download the first two episodes of the Xamarin Podcast today and subscribe to ensure that you never miss any announcements, interesting blog posts, projects, or tips and tricks from fellow developers.

podcast icon

We are two episodes in to this season, and in the latest episode Pierce and I were joined by fellow Xamarin Developer Evangelist James Montemagno to discuss plugins for Xamarin. James gives us the run down on why you should use plugins and how to go about developing your own. We also discuss HomeKit, the latest Xamarin Profiler, new components for Google Services, and upcoming events.

 

Get Involved

Do you have an interesting story, project, or advice for other .NET mobile developers? If so, Pierce and I would love to share it with the Xamarin community! Tweet @XamarinPodcast to share your blog posts, projects, and anything else you think other mobile developers would find interesting.

Subscribe or Download Today

To make it easier than ever to hear the latest news in the .NET, C#, and Xamarin realm, the Xamarin Podcast is available from both iTunes and SoundCloud. Be sure to download the first two episodes today, and don’t forget to subscribe!

Download today

 

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 22, 2015

Case Study: Development Time Slashed by 50% for Leading Transport Company

By

mrw-logoMRW is Spain’s leading national and international express transport company. Powered by 10,000 people linked to the brand in over 1,300 franchises and 64 logistical platforms in Spain, Portugal, Andorra, Gibraltar, and Venezuela, MRW handles an average of 40 million parcel deliveries per year and ships to more than 200 countries and over 10,000 online stores.
 
A mission critical element of the company’s success is the MRWMobile app that supports 2,500 concurrent users in the field by helping them with process optimization, including delivery coordination. MRWMobile was developed by the company’s Portugal-based partner Moving2u, and after the successful creation of MRWMobile 3 for Windows, MRW wanted to expand to Android.
 
MRW app on HTC OneThe app is used in the field for a range of functions, including proof of picking up deliveries in real time, receiving new work orders, and for rescheduling order pick ups and deliveries—all while using secure communications and local data encryption. To support these functions, the app needs to support a range of capabilities, including offline work, local storage, push sync, multi-threading, barcode scanning, photos, and signature capture. The app also incorporates geolocation, multilingual support, multiple user profiles, mobile payment, printing, document scanning, and internal communications with messages and tasks.
 
The magnitude of requirements coupled with budget and conflicting project roadblocks created time-to-market challenges. “Without Xamarin, it would have taken at least twice as long to have the full feature set of the app built and tested,” says Alberto Silva, R&D Manager at Moving2u.
 
“Xamarin is the right approach for any serious Android, iOS, or mobile cross-platform app development,” Alberto adds. “Even if you don’t plan to go cross-platform, the productivity of Xamarin in producing an app for a single platform in C# is unmatched.”
 

View the Case Study
 

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 21, 2015

RSVP for Xamarin’s WWDC 2015 Party

By

Join the Xamarin team for a party celebrating WWDC at Roe Restaurant on Tuesday, June 9th, from 6:00 – 9:00pm. Just two blocks from Moscone you’ll find great conversation with your fellow mobile developers, drinks, and appetizers. We’d love for you to join us to talk about your apps and projects and the latest news from Apple.

WWDC 2015 Logo

When: Tuesday, June 9th, 6pm-9pm
Where: Roe Restaurant, 651 Howard St, San Francisco, CA, 94105

RSVP

Even if you’re not attending WWDC, all of our Bay Area friends are welcome!

You can make the most of your time in town for WWDC week by scheduling dedicated time with a member of our team.

We hope to see you there!

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 20, 2015

Get Started with HomeKit

By

Next month sees the launch of several highly anticipated HomeKit accessories, which were debuted earlier this year at CES. With HomeKit-enabled accessories finally coming to market, it’s time to create iOS apps that utilize Apple’s home automation APIs.

homekit

HomeKit is designed to bring an end to individual apps for smart home accessories. Gone are the days where you will be switching between apps to set up a perfect movie night scene; instead you’ll have one app, which communicates to all of your accessories using HomeKit.

HomeKit has a couple of core concepts that form the basis for the entire API. The general idea of HomeKit is that you interact with a Home, which has Rooms, which have Acessories, which have states. In order to get started, you’ll need to create a Home Manager. The Home Manager is your entry point to HomeKit – it keeps a common database of Accessories and allows you to manage your Home(s). It also notifies you of changes, which makes it easy to deal with changes to the HomeKit configuration from other HomeKit-enabled apps.

General Setup Tips

If you’re looking to test these APIs, it’s worth noting that you’ll need access to a physical iOS device running iOS 8 at a minimum. HomeKit doesn’t currently work within the iOS Simulator and the exception thrown doesn’t hint towards this. Because you’re running on the device, you’ll need to make sure you’ve set the entitlements for the project to allow for HomeKit. You’ll probably also want to grab a copy of Apple’s Hardware IO Tools for Xcode. The Hardware IO Tools for Xcode allow you to simulate HomeKit-enabled devices for testing your app. You can fetch this from the Apple Developer Center if you’re an existing member.

Creating a Home

To create a Home, we must first create an instance of the Home Manager.

var homeManager = new HomeKit.HMHomeManager();

Once we’ve done this, we can go ahead and add a Home to the homeManager object.

homeManager.AddHome("Guildford", (HomeKit.HMHome home, NSError error) =>
{
    if (error != null)
    {
        // Adding the home failed. Check the error object for why!           
    }
    else
    {
        // Successfully added home!
    }
});

All Homes within your HomeKit configuration must have a unique name, so if we have two homes in the same city, it might be worth finding another naming convention. Homes must be uniquely named because we will be able to interact with them using Siri once Apple fully enables HomeKit (hopefully later this year). For example, we’ll be able to say, “Hey Siri, turn my lights off in Guildford,” and like magic, all of the lights in your Home in Guildford will be switched off.

Once you’ve added a Home, the DidUpdateHomes event will be raised. This allows other apps to ensure they’ve processed any new Homes that have been added to the database. We can subscribe to the event with the following API.

homeManager.DidUpdateHomes += (sender, args) =>
{     
	foreach (var home in homeManager.Homes)     
	{         
	    var alert = new UIAlertView("Home...", home.Name, null, "OK");  
	}
};

Creating a Room

A Home also contains Rooms, each of which has a list of Accessories that are unique to that particular Room. Much like the Home, a Room can notify you about any changes and must also be uniquely named. This again allows you to interact with the Room using Siri. The API for creating a Room is almost identical to creating a Home.

home.AddRoom("Kitchen", (HMRoom room, NSError error) =>
{     
	if (error != null)     
	{         
	    //unable to add room. Check error for why     
	}     
	else     
	{         
	    //Success     
	}
});

Accessories

Accessories are where HomeKit starts to become a little more interesting. Accessories correspond to physical devices and must be assigned to a Room. They have a device state which allows you to query them. For example, you can query the intensity of a light fixture or the temperature of a thermostat. As you’ve probably already guessed, Accessories must be uniquely named, but this time only within the Home where they reside. Accessories will also notify you of changes to the state so you don’t have to constantly query them to ensure your app is up to date; one common event that you can be notified of is when the device is reachable.

accessory.DidUpdateReachability += (o, eventArgs) =>
{                         
	if (accessory.Reachable == true)                         
	{                             
	    //we can communicate with the accessory                         
	}                         
	else                         
	{                             
	    //the accessory is out of range, turned off, etc                    
	}                     
};

A few of the more interesting aspects of Accessories are Services and Characteristics. A Service represents a specific piece of device functionality. For instance, Apple gives the example that a garage door accessory may have a light and a switch Service. Users wouldn’t ever create Services or Characteristics as these are supplied by the accessory manufacturer, but it’s your job as a developer to make sure they can interact with the Services.

Action Sets and Triggers

Actions are by far my favorite feature of HomeKit. Actions and triggers allow you to control multiple Accessories at once. For example, when I go to bed I like to turn the lights off and turn my fan on. I can program this action with HomeKit to set the state of the Accessories and then use triggers to call the action. I personally have an iBeacon stuck to the underside of my nightstand which could detect my proximity and then call my action set for sleeping. As with almost every aspect of HomeKit, each action set has a unique name within the Home that can be recognized by Siri.

Conclusion

I’m extremely excited about the prospect of HomeKit evolving into the go-to solution for home automation. With HomeKit-enabled accessories finally coming to market, there’s never been a better time to create an iOS app that utilizes Apple’s home automation APIs.

To start integrating HomeKit into your apps today, check out our HomeKitIntro sample, which will give you everything you need to build amazing home automation apps with HomeKit.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 19, 2015

Xamarins on Film: New Video Resources

By

The Xamarin team is popping up everywhere; from conferences and user groups to Xamarin Dev Days, odds are high that you can find a member of our team at an event near you. If, however, you we haven’t made it to your neck of the woods, observing a Xamarin on film can be just as fascinating and educational. For your viewing pleasure, and to teach you about a wide variety of mobile C# topics, we present footage from some recent sightings below.

Building Multi-Device Apps with Xamarin and Office 365 APIs

Have you been curious about how to integrate your Xamarin apps with Azure Active Directory and utilize the brand new Office 365 APIs? Look no further than James Montemagno’s session at this years Microsoft Build conference on how to integrate all of these services from a shared C# business logic backend.

Cross-Platform App Development with .NET, C#, and Xamarin

Xamarin Developer Evangelist Mike James recently spoke at the Technical Summit in Berlin, providing a complete overview of how to build native cross-platform apps with C# and Xamarin.

Tendulkar Explains

If you’re just getting started, you can learn the basics of Xamarin and mobile app development one step at a time by following along with Xamarin Developer Evangelist Mayur Tendulkar in his new, ongoing series, tendulkar-uvāca (Tendulkar Explains). The first episode, below, covers how to set up your development environment.

Developing Cross-Platform 2D Games in C# with CocosSharp

13cc9fce-3d69-4b8e-8bc5-35580ff98e33 If you haven’t been following James Montemagno’s appearances on Visual Studio Toolbox, then you’re in for a treat! Officially setting the record for most appearances, his latest visit takes a look at cross-platform 2D games with CocosSharp.

Real-Time Monitoring of Mobile Apps with Xamarin Insights

13cc9fce-3d69-4b8e-8bc5-35580ff98e33In his 8th appearance on Visual Studio Toolbox, James joins Robert Green to discuss monitoring your apps in real time with Xamarin Insights.

Live Events

If you’d like to catch a Xamarin talk in person, check out our upcoming events here.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 18, 2015

Join Xamarin at Twilio Signal

By

Join Xamarin at Twilio Signal, a developer conference in San Francisco, CA on May 19-20, 2015 covering communications, composability, iOS and Android, WebRTC, and much more. Key members of the Xamarin team will be available to answer your questions, discuss your apps and projects, and show you what’s new across our products.

Twilio Signal Conference Logo

Xamarin Developer Evangelist James Montemagno will also be be presenting C# and Twilio-powered iOS and Android experiences on Wednesday, May 20 at 1:45 pm, covering how to leverage the Twilio Mobile Client native SDK for iOS and Android from C# to create a rich communication experience in your mobile apps.

We’ll be in the Community Hall, so stop by with your questions or just to say hello. If you’re not already registered, limited tickets remain, and you can use promo code “Xamaringuest” for 20% off registration. We look forward to seeing you there!

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 15, 2015

Community Contributions You Won’t Want to Miss

By

Xamarin developers not only love building amazing mobile apps in C#, they also love helping the developer community at large. Whether through building great open-source libraries, components, and plugins or sharing their experience in forums, blog posts, and podcasts, our community consistently steps up to make development with Xamarin a pleasure. The links below will take you to some of our favorite content from our community over the past few weeks.

Podcasts

Great Community Posts

Tools & Frameworks

Xamarin.Forms

Thanks to these developers for sharing their knowledge and insight with the rest of the Xamarin community! If you have an article or blog post about developing with Xamarin that you’d like to share, please let us know by tweeting at @XamarinHQ.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 14, 2015

Crafting 5 Star iOS Experiences With Animations

By

When I think about the iPhone apps I use the most, they all have one thing in common: they use custom animations to enhance the user experience. Custom animations provide an immersive experience, which can add a whole new element of enjoyment to your user experience.

iOS is jam-packed with beautiful and subtle animations, visible from the moment you unlock the phone. Subtlety is the key to delivering the best experience, as Apple is very clear that developers should avoid animations that seem excessive or gratuitous.

Original keynote design

With over 1.2 million apps on the iOS app store alone, if you want your app to get noticed, it needs to stand out from the crowd. The easiest way to do this is with a unique user interface that goes beyond the generic built-in controls and animations.

In this blog, I’m going to show you how you can easily prototype and add custom animations to your iOS apps. Before we get started on the technical details, it’s worth discussing a tip used by some of the best mobile app designers.

Prototype in Keynote or PowerPoint

It’s no secret that to create something that appears simple often requires a large amount of iteration to refine it to its simplest form. This is definitely the case when it comes to UI design and animation design. Many UX designers will use tools like Keynote or PowerPoint, which include built-in animations, for prototyping. During this part of the design process, you are free from thinking about the complexities of the implementation and can focus on the desired result. It’s a step in the design process I highly recommend to everyone who is creating custom animations and transitions. Below is an animation movie exported from Keynote, which you can use to compare to the final animation.

keynote designed animation
Implementation

Once you’ve designed your animations, you’ll need to start implementing them. Rest assured, though, as iOS has a fantastic animation API that makes the experiences very straight forward. You’ll most likely be reusing many of the animations you create across your app, which Apple actually recommends in the iOS human interface guidelines.

The implementation for your views rely on Apple’s Core Animation framework. This framework consists of a number of extremely powerful APIs that cater to different requirements. For example, you can create block, key frame, explicit, and implicit animations with Core Animation. Another option is to animate your views using UIKit, which is an approach I use a lot in Dutch Spelling.

For example, I change the position of a button as well as changing its visibility over .2 seconds.

 //Move button Asynchronously and fade out
 AnimateAsync(0.2, () =>
 {
     button.Frame = CalculatePosition(_buttonsUsedInAnswer.IndexOf(button));
     button.Alpha = 0.0f;
});

The snippet above deals with the button animation; below is a video of the animation running on a the device.

final animation
Another example from Dutch Spelling is shrinking views over time. I use this to draw attention to other visual elements within the UI.

//Shrink WordView Asynchronously and then set font.
public void ShrinkWord()
{
    var transform = CGAffineTransform.MakeIdentity();
    transform.Scale(1f, 1f);
    UIView.AnimateAsync(0.6, () =>
    {
        _word.Transform = transform;
        _title.TextColor = "3C3C3C".ToUIColor();
    });
    _word.Font = UIFont.FromName("Raleway-Regular", 32);
}

Further Reading

You can find more examples to help you get started building your own 5-star app animations in our Core Animation documentation here.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone
May 13, 2015

RSVP for Xamarin’s Google I/O 2015 Party

By

Join the Xamarin team on May 27th at Southside Spirit House from 7-10pm to kick off Google I/O!

Google I/O

Spend the night before Google I/O with the Xamarin Team and fellow mobile developers and check out the Xamarin Test Cloud wall in person to see how easy mobile testing can be.

Xamarin Test Cloud Wall

When: Wednesday, May 27th, 7pm–10pm
Where: Southside Spirit House, 575 Howard St, San Francisco, CA, 94105

RSVP

In the Bay Area but not attending Google I/O? Stop by anyway! You and your friends are welcome. Make the most of your time at Google I/O and schedule dedicated time with the Xamarin team while you’re in town for the conference. We’d love to meet you, learn about your apps and discuss ways we can help.

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone