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. mongo中命令工作原理

    1.db.runCommand命令 db.runCommand({OPTION:'COLLECTION_NAME'}) runCommand命令是mongo的执行命令,可以执行mongo的任何命令,其 ...

  2. X--名称空间详解

    转自:http://blog.csdn.net/lisenyang/article/details/18312039 X名称空间里面的成员(如X:Name,X:Class)都是写给XAML编译器看的. ...

  3. Redis学习之底层链表源码分析

    Redis底层链表的源码分析: 一.链表结点的结构(单个结点): // listNode 双端链表节点 typedef struct listNode { // 前置节点 struct listNod ...

  4. Spring cache 使用说明

    package org.cheng.user.client.service; import java.util.HashMap; import java.util.Map; import org.ch ...

  5. netty同端口监听tcp和websocket协议

    前言: 软件通信七层结构(osi模型)中由协议套协议最终组成最高级应用层协议(http等等),下三层结构偏向与数据通信,上三层更偏向于数据处理,中间的传输层则是连接上三层与下三层之间的桥梁,每一层都做 ...

  6. 基于linux下的krpano的使用

    鉴于目前网络上关于krpano的使用和介绍少之又少,结合自己的学习和使用经历,做个总结和记录. 1.安装 下载地址: linux https://krpano.com/forum/wbb/index. ...

  7. c语言之字符输入输出和输入验证

    单字符I/O:getchar()和putchar() #include<stdio.h> int main(void) { char ch; while ((ch = getchar()) ...

  8. sql 查询优化小计

    好久没更博了,偷偷的抽时间写一下. 早上开始working的时候,发现一个页面加载很慢,经排查是昨天写的一条联合查询的sql导致的.于是着手优化! 首先想到的是在join的时候,减少表体积之后再进行关 ...

  9. YARN的笔记

  10. 使用HttpUtils完成Http Basic 认证

    调用声网(agora)的远程接口(Restful Api)时,对方需要使用Basic Auth的方式进行认证(需要输入用户名和密码). 一,使用Postman完成基于Basic Auth的Http认证 ...