It is 2017, and it is almost criminal to say that your app doesn't work on a given mobile platform. This means, most mobile developers are building cross-platform apps. Xamarin has helped democratize cross-platform mobile development for .NET developers. You get world-class IDEs and tooling to build your Xamarin apps on any platform.

But deploying apps to devices remains tricky – developers often have to deal with native platform SDKs, varying OS versions and device provisioning. It's a pain to get your cross-platform app running on your device!

At Microsoft BUILD this year they announced Xamarin Live Player, which aims to ease some of this pain of deploying apps to devices. Is it the panacea for seamless app deployments across all mobile devices?

While Xamarin Live Player may just be getting started, the promise is there for sure. This article explores Xamarin Live Player in all its glory and some fallacies. The age of easy mobile app deployments is upon us.

What is it?

Xamarin Live Player promises seamless deployment of Xamarin apps to iOS and Android devices. The goal is to enable faster developer workflows – develop, deploy, test, change, re-deploy and debug – all on your personal iOS/Android device without any hassles or provisioning. You can get started today at xamarin.com/live. There is also a dedicated Xamarin Show episode that can help you get going with Xamarin Live Player.

This promise is not new for cross-platform apps though, just rather complex to pull off given the sheer variety of mobile devices. It is interesting to note that developers using web technologies to build cross-platform mobile apps – both hybrid or native – have had such device deployment tools for a while – the notable ones being Telerik AppBuilder LiveSync and Ionic LiveReload.

One may argue however, that hardcore .NET developers wanting to build mobile apps in C# have never had such luxuries. This is where Xamarin Live Player steps in – bringing continuous deployment and debugging to most iOS/Android devices for Xamarin apps.

Want to get started? The first call to action is to get the Xamarin Live Player apps, available conveniently in the Apple iOS and Google Play stores.

Go ahead, and download the app on your respective phone (as seen on my iPhone above). Note that two of the most prolific Xamarin developers, James Montemagno and Frank Krueger, have had their hands in the Xamarin Live Player app, so you will not be disappointed. Also as a shoutout, James and Frank do this awesome developer podcast called Merge Conflict – give it a listen on your next long drive.

The Xamarin Live Player app doesn't have fancy UI and doesn't do much out of the box – the magic is what happens under the hood. The Live Player app is meant to be paired to your Xamarin development IDE – Visual Studio on Windows or Mac – running on a machine over the same WiFi network as your phone. Once paired, the Xamarin Live Player becomes a shim that can seamlessly run your Xamarin apps inside, just as if running on the device as a native app. You get to deploy apps through the Xamarin Live Player onto your devices completely wirelessly – how cool is that? Your code never gets sucked up to any cloud servers – just a quick exchange of bits over WiFi between your IDE and the Xamarin Live Player app.

How does it work?

So you may be wondering how the Xamarin Live Player works and what it takes to deploy your Xamarin apps to your phone. Xamarin Live Player can act as a shell that runs your Xamarin apps on iOS and Android – this works for Xamarin.Forms as well as native UIs in Xamarin iOS/Android.

On first launch, Xamarin Live Player will tell you it needs to be paired with a Visual Studio instance running on a computer on the same WiFi network.

The first step towards getting Xamarin Live Player working is a little handshake – a pairing between the app running on your phone with the corresponding Visual Studio instance, running on either Windows or Mac. In the Xamarin Live Player app, go ahead and start the 'Pair to Visual Studio' process – the app gets into a camera mode to scan a QR code and also shows a unique access code for VS pairing. Then in your Visual Studio IDE, choose the Xamarin Live Player configuration wizard (from Devices list) to pair to the Xamarin Live Player app running on phone in the same wifi.

The pairing screen presented by Visual Studio gives you two choices – either scan the generated QR code from your Xamarin Live Player app or simply punch in the access code from the app into Visual Studio. That's all the handshake it takes to pair the app with Visual Studio. Visual Studio can now 'see' your Xamarin Live Player running phone and lists it as just another device for deployment. Already paired iOS and Android devices show up in the pairing screen and you can choose between any. The Live Player app says, "I'm ready, just fire away from inside of Visual Studio."

The Workflow

The whole point of Xamarin Live Player is easy deployment of Xamarin apps to iOS/Android devices for seamless debug/test experience from inside Visual Studio. Once the app and IDE have been paired, you should be all set to get in the groove of easy deployments as you are coding – just point to the Live Player from Visual Studio, as seen here in my VS for Mac.

If you want to try out the Xamarin Live Player from a pre-built app first, there are several samples out there. Here's the ColorControl app running on my iPhone through the Xamarin Live Player.

Once the Xamarin Live Player has been paired with Visual Studio and your app is running on the device, subsequent deployments become easy – just hit run from Visual Studio and your Xamarin code is continuously deployed through the app. And yes, you can debug and hit breakpoints in your code as your app is running in the Xamarin Live Player.

The Magic

Deploying apps to device after a full build? That's just the basics – what you want is a even more seamless development/debugging experience. What you need is live edits – make continual changes to your code and see it reflected right away in the app running on your device. Xamarin Live Player obliges with a special continuous run mode – the Live Run View.

The idea is that the continuous run mode is per page – you enter it when you want to fiddle around with code on a given Xamarin UI page. The apps's navigation is hidden away and you get to focus on one page at a time. Go ahead and change some XAML markup or even code behind – save your changes and The Xamarin Live Player app seamlessly picks up the code changes that you have made to a given page and the app refresh shows your changes running. Do this continuously and you can see how it becomes an incredibly handy tool to perfect one UI page at a time – update and run your code live.

The Caveats

Is this all sounding a little too good to be true? Well, for the most part, Xamarin Live Player delivers on the promises – but keep in mind, this is still V1 for the product. If you're having a hard time making Xamarin Live Player work for your app, device and IDE, stay calm and read on to make sure you're not running up against known caveats.

PREVIEW BITS

Xamarin Live Player is very new to this game and you are dealing with pre-release software here. While the iOS/Android apps are easy to get from the respective stores, the Visual Studio integration bits are for preview only. If using Visual Studio for Mac, you need to switch to the Alpha channel for the latest bits. If you're on Windows, you'll need Visual Studio 2017 15.3 Preview with the Xamarin Updaterinstalled to get the latest updates that include Xamarin Live Player support.

DEVICE LIMITATIONS

Xamarin Live Player has some requirements on the mobile OS front and has a list of supported devices, albeit all modern phones included. For iOS, you'll need iOS 9 or later installed on iPhones or iPads – please check app store listing for compatibility. For Android, you'll need 4.2 and up – again check app listing for support.

APP SIZE RESTRICTIONS

There are some app package size limitations with the Xamarin Live Player app.

APP CUSTOMIZATIONS

While Xamarin Live Player makes it easy for you to deploy your Xamarin apps to iOS/Android devices, some app customizations are just not possible to test – remember, your app is running inside a shell. These customizations include app icons, splash screens, app extensions and custom widgets. There is also limited support for iOS Storyboards and code reflections.

YOU STILL NEED A MAC

So developing iOS apps through Xamarin has always necessitated the presence of a Mac on the network or in the cloud – the app package for the store has to be built through XCode running on a Mac licensed to the corresponding developer. Xamarin Live Player does a good job of taking the Mac out of the picture for regular development/testing/debugging cycles – you can deploy directly to your iOS devices from Visual Studio. But once your app is ready, you would still need the Mac to build the final app package. Also, apps running inside the Xamarin Live Player are functioning under a wrapper shim – you would eventually want to test true app performance on iOS by doing real deployment through a provisioned device and licensed XCode.

NO CUSTOM RENDERERS

This may trip you up in case you haven't read the docs carefully. Xamarin Live Player, as of now, does not support custom UI renderers for Xamarin.Forms or Xamarin.iOS/Android. If you have had to dip into native platform UI from your app through a custom renderer, this will likely be a stumbling block.

Also to note, most 3rd party UI libraries often use custom renderers for polished native UI controls – these would trip up the Xamarin Live Player as well. So stay calm, use device simulators and be patient for updates to the Xamarin Live Player.

Are We There Yet?

You may ask: Is the Xamarin Live Player ready for primetime yet? Well, the answer is yes and no. One can clearly see the promise of Xamarin Live Player – seamless Xamarin app deployment to iOS/Android devices for continuous core development, debugging and testing cycles. But being in the first wave of product iteration, Xamarin Live Player clearly has some shortcomings. If they are dealbreakers for you, continue what you are doing now for Xamarin app testing and wait for a better future. We developers need not be so cynical – tomorrow still looks to be glorious.

Doing cool mobile app development with Xamarin? Your app will invariably benefit from polished performant UI controls – take a look at Telerik UI for Xamarin and get a free trial to play around. Truly native, truly cross-platform rich UI controls for all your Xamarin apps – your dream app needs good UI.

The Xamarin Live Player Unpacked的更多相关文章

  1. 微软发布Xamarin Live Player:Win10可开发iOS

    微软在Build2017大会上发布一款名为Xamarin Live Player的全新工具,可以让PC用户在不使用Mac的前提下测试和调试iOS应用.但是向App Store提交应用时仍然需要Xcod ...

  2. Xamarin笔记

    Xamarin学习笔记 1. Xamarin Studio自动更新下载的安装文件缓存路径:C:\Users\登录用户\AppData\Local\XamarinStudio-5.0\Cache\Tem ...

  3. visual studio xamarin 离线安装文件以及 android 模拟器

    介绍 为了使用vs开发android我也是煞费苦心,先是从网上各种搜刮文章,然后找各种各样的离线包(因为国内网络是下载不了C#/Xamain)的包的,还有各种各样的安装包,都已快接近奔溃的边缘.每次不 ...

  4. Xamarin.Forms 开发IOS、Android、UWP应用

    C#语言特点,简单.快速.高效.本次我们通过C#以及Xaml来做移动开发. 1.开发工具visual studio 2015或visual studio 2017.当然visual studio 20 ...

  5. xamarin开发android收集的一些工具

    xamarin开发android收集的一些工具 工欲善其事,必先利其器,从16年下半年开始做xamarin相关的开发,平时使用的一些工具和google插件给大家分享一下,都有下载地址,持续更新. Vi ...

  6. Xamarin 学习笔记 - 配置环境(Windows & iOS)

    本文翻译自CodeProject文章:https://www.codeproject.com/Articles/1223980/Xamarin-Notes-Set-up-the-environment ...

  7. 关于Xamarin、Qml、数据绑定、MVC、MVVM 相关的散讲

    关于Xamarin.Qml.数据绑定.MVC.MVVM 相关的散讲 SURFSKY 2017.02 最近又在学习Xamarin了?为什么是“又”?有几个利好消息,让我重新拾起它: ()微软去年收购了X ...

  8. Xamarin.Forms第三方XAML预览工具-LiveXAML简单体验

    截至目前,Xamarin官方的Xaml Previewer工具仍然处于测试阶段,使用中也发现了各种不便,例如各种莫名其妙的渲染失败,或者提示需要编译项目才能渲染等等,复杂项目基本不可用, 完全没有体现 ...

  9. Xamarin入门浅析

    1. 安装 1) 使用标准安装流程(JDK1.6 -> Android SDK -> NDK -> Xamarin Studio -> Xamarin Visual Studi ...

随机推荐

  1. c# WPF RichTextBox 文字颜色

    public MainWindow() { InitializeComponent(); Run run = new Run("This is my text"); run.For ...

  2. 自定义实现moveable button

    实现的效果图: 自定义MVButton,继承自UIButton. 属性声明如下: @property (nonatomic) CGPoint beginPoint; @property (nonato ...

  3. hibernate(*.hbm.xml)中新添加的字段被标记为红色(找不到)的解决方法

    首先得是以这个方式生成的bean和xml,配置好了数据源(这样才能让hibernate中的配置和mysql进行交互) https://www.cnblogs.com/kinome/p/10549969 ...

  4. Spark官方调优文档翻译(转载)

    Spark调优 由于大部分Spark计算都是在内存中完成的,所以Spark程序的瓶颈可能由集群中任意一种资源导致,如:CPU.网络带宽.或者内存等.最常见的情况是,数据能装进内存,而瓶颈是网络带宽:当 ...

  5. IdentityServer4 实战文档

    一.前言 IdentityServer4实战这个系列主要介绍一些在IdentityServer4(后文称:ids4),在实际使用过程中容易出现的问题,以及使用技巧,不定期更新,谢谢大家关注.这些问题. ...

  6. 在GridControl控件上绑定图片的几种操作方式

    我们知道,基于DevExpress的开发Winform的项目界面的时候,GridControl控件是经常用来绑定数据的,一般以常规的字符内容为主,有时候也会有图片的显示需要,那么如果显示图片,我们应该 ...

  7. MySQL 8 新特性之自增主键的持久化

    自增主键没有持久化是个比较早的bug,这点从其在官方bug网站的id号也可看出(https://bugs.mysql.com/bug.php?id=199).由Peter Zaitsev(现Perco ...

  8. Python全栈开发之路 【第五篇】:Python基础之函数进阶(装饰器、生成器&迭代器)

    本节内容 一.名称空间 又名name space,就是存放名字的地方.举例说明,若变量x=1,1存放于内存中,那名字x存放在哪里呢?名称空间正是存放名字x与1绑定关系的地方. 名称空间共3种,分别如下 ...

  9. Linux下php安装redis扩展(redis已经安装)

     1. 下载需要的php操作redis的扩展包 (1).切换到 cd  /usr/local/src (2).   wget https://github.com/nicolasff/phpredis ...

  10. 如何让vba与java的TripleDES算法通用

    本文链接:http://www.cnblogs.com/Charltsing/p/TripleDES.html 众所周知,java默认采用的TripleDES算法是ECB+PKCS#5填充方式.网上可 ...