The Xamarin Live Player Unpacked
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的更多相关文章
- 微软发布Xamarin Live Player:Win10可开发iOS
微软在Build2017大会上发布一款名为Xamarin Live Player的全新工具,可以让PC用户在不使用Mac的前提下测试和调试iOS应用.但是向App Store提交应用时仍然需要Xcod ...
- Xamarin笔记
Xamarin学习笔记 1. Xamarin Studio自动更新下载的安装文件缓存路径:C:\Users\登录用户\AppData\Local\XamarinStudio-5.0\Cache\Tem ...
- visual studio xamarin 离线安装文件以及 android 模拟器
介绍 为了使用vs开发android我也是煞费苦心,先是从网上各种搜刮文章,然后找各种各样的离线包(因为国内网络是下载不了C#/Xamain)的包的,还有各种各样的安装包,都已快接近奔溃的边缘.每次不 ...
- Xamarin.Forms 开发IOS、Android、UWP应用
C#语言特点,简单.快速.高效.本次我们通过C#以及Xaml来做移动开发. 1.开发工具visual studio 2015或visual studio 2017.当然visual studio 20 ...
- xamarin开发android收集的一些工具
xamarin开发android收集的一些工具 工欲善其事,必先利其器,从16年下半年开始做xamarin相关的开发,平时使用的一些工具和google插件给大家分享一下,都有下载地址,持续更新. Vi ...
- Xamarin 学习笔记 - 配置环境(Windows & iOS)
本文翻译自CodeProject文章:https://www.codeproject.com/Articles/1223980/Xamarin-Notes-Set-up-the-environment ...
- 关于Xamarin、Qml、数据绑定、MVC、MVVM 相关的散讲
关于Xamarin.Qml.数据绑定.MVC.MVVM 相关的散讲 SURFSKY 2017.02 最近又在学习Xamarin了?为什么是“又”?有几个利好消息,让我重新拾起它: ()微软去年收购了X ...
- Xamarin.Forms第三方XAML预览工具-LiveXAML简单体验
截至目前,Xamarin官方的Xaml Previewer工具仍然处于测试阶段,使用中也发现了各种不便,例如各种莫名其妙的渲染失败,或者提示需要编译项目才能渲染等等,复杂项目基本不可用, 完全没有体现 ...
- Xamarin入门浅析
1. 安装 1) 使用标准安装流程(JDK1.6 -> Android SDK -> NDK -> Xamarin Studio -> Xamarin Visual Studi ...
随机推荐
- 2018年Java生态行业报告
0 Java版本使用占比 毫无疑问,Java8被广泛用于生产环境! Java 9和Java 10的使用率非常低,不到5%. 2017年,Java 7和更早的版本的数量大约是24.4%,现在是10. ...
- 【Python撩妹合集】微信聊天机器人,推送天气早报、睡前故事、精美图片分享
福利时间,福利时间,福利时间 如果你还在为不知道怎么撩妹而烦恼,不知道怎么勾搭小仙女而困惑,又或者不知道怎么讨女朋友欢心而长吁短叹. 那么不要犹豫徘徊,往下看.接下来我会分享怎么使用 Python 实 ...
- 深入理解Redis Cluster
Redis Cluster采用虚拟槽分区,所有的key根据哈希函数映射到0~16383槽内,计算公式: slot = CRC16(key) & 16383 每个节点负责维护一部分槽以及槽所映射 ...
- 跨界 - Omi 发布多端统一框架 Omip 打通小程序与 Web
Omip 今天,Omi 不仅仅可以开发桌面 Web.移动 H5,还可以直接开发小程序!直接开发小程序!直接开发小程序! Github Omi 简介 Omi 框架是微信支付线研发部研发的下一代前端框架, ...
- Method not found: !!0[] System.Array.Empty()错误
最近由于公司项目需要将之前支持的TLS1.0改成更安全的TLS1.2,而公司现有项目都是老系统,有的是.NET FrameWork 4.0,有的是.NET FrameWork3.5,但是TLS1.2默 ...
- C. Nastya Is Transposing Matrices
链接 [https://codeforces.com/contest/1136/problem/C] 题意 给你两个规模一样的矩阵 问是否可以通过不断选取A矩阵的子"方正"转置得到 ...
- Graph Without Long Directed Paths CodeForces - 1144F (dfs染色)
You are given a connected undirected graph consisting of nn vertices and mm edges. There are no self ...
- 【转】redis-cluster安装配置
需要三台虚拟机(生产环境是3个物理机),分配静态IP.cluster中共6个节点.3主3从.本文中每个虚拟机上的redis端口:6379 6380. 需要注意的两点: 3个主节点分别位于3台虚拟机上, ...
- Docker Compose vs. Dockerfile
Docker Compose vs. Dockerfile - which is better? - Stack Overflowhttps://stackoverflow.com/questions ...
- [官网]CREATE EXTENSION PostGreSQL 创建函数的方法
CREATE EXTENSION https://www.postgresql.org/docs/current/sql-createextension.html CREATE EXTENSION — ...