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. kali 源

    #阿里云 deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.al ...

  2. day95

    Linux基本部署配置及常见扩展应用 Linux软件包安装方法 1. 安装: 整个安装过程可以分为以下几步: 1) 取得应用软件:通过下载.购买光盘的方法获得: 2)解压缩文件:一般tar包,都会再做 ...

  3. A2D JS框架 - Web API CSRF保护实现

    这次自己实现了类似jQuery中ajax调用的方法,并且针对RESTFul进行了改造和集成,实现的A2D AJAX接口如下: $.ajax.RESTFulGetCollection("/ap ...

  4. DSL 系列(1) - 扩展点的论述与实现

    前言 DSL 全称为 domain-specific language(领域特定语言),本系列应当会很长,其中包含些许不成熟的想法,欢迎私信指正. 1. DSL 简述 我理解的 DSL 的主要职能是 ...

  5. Python-os模块-60

    os 模块: 和操作系统打交道的模块 os模块是与操作系统交互的一个接口 os.makedirs('dirname1/dirname2') 可生成多层递归目录 os.removedirs('dirna ...

  6. Unix / Linux 线程的实质

    线程与进程的比较 概述: 进程是具有一定独立功能的程序关于某个数据集合上的一次运行活动,进程是系统进行资源分配和调度的一个独立单位. 线程是进程的一个实体,是CPU调度和分派的基本单位,它是比进程更小 ...

  7. matplotlib 入门之Usage Guide

    文章目录 Usage Guide plotting函数的输入 matplotlib, pyplot, pylab, 三者的联系 Coding style Backends 后端 matplotlib教 ...

  8. PS 制作彩色烟雾

  9. iOS 快速集成ijkplayer视频直播与录播框架

    最近由于需求的变动,项目内把最初最简单的原生直播框架变成了B站开源的ijkplayer框架,下面把具体的过程总结一下整个过程都比较简单,重要的是理解的过程,集成完毕之后,视频的用户体验比苹果原生好了很 ...

  10. Docker : Tomcat Clustering with Load Balancer (Tomcat and Nginx)

    Tomcat Clustering Series Part 5 : NginX as Load Balancer - Ramki Technical Bloghttps://www.ramkitech ...