Jonathan Peppers


Xamarin, C# nerd, at Microsoft

Xamarin's Tiny Cuts

EDIT: if you are running into this post now, keep in mind that most of these issues are long fixed. Update on this here.

I want to start out this post by saying I am a great lover of Xamarin and their tools. Without Xamarin, I would might not have become a mobile developer and most of the success the company I work for (Hitcents) has had with mobile apps would not be possible. C# is a beautiful language, and I think it is in good hands moving forward no matter what Microsoft decides to do in the next few years.

With that being said, using Xamarin every day reminds me of a phrase Scott Hanselman used recently, “death by a thousand tiny cuts”. Not that any amount of these tiny cuts is that big a deal compared to developing in some nonsense like Objective-C, but it is just enough to be annoying. My fear is that Xamarin has been putting a lot of focus on big picture new features, when a little polishing could help a lot of developers lives. My goal here is to create a big wish list everyone can contribute to, not criticize their products.

Here is a list to start things off (these are all currently happening on the latest stable Xamarin releases). I’ll categorize these by product:

    • Xamarin Studio
    • Plugging in an iOS device resets the configuration drop down.
    • This is annoying because a developer will commonly set it to iOS Device, then plug one in and hit run. This will launch the iOS simulator because it is normally the first in the list.
    • Support full razor on iOS/Android
    • Implement helpers like @Html, @Url, etc.
    • Support C# code inside attributes
    • Using razor (at least for iOS/Android) has a bug where you have to save the file prior to build, or the build will commonly not have your latest changes.
    • Portable Class Libraries
    • Yes they are “supported”, but intellisense does not work and half of my code is highlighted red. All references show up as errors. Can we get the same experience as a standard class library?
    • Make the source control plugins better
    • I find myself using Github for Mac and Versions over Xamarin Studio, just because they are nicer. I should not prefer to use these programs, as I don’t use them often on Windows with VS (I normally use VS extensions).
    • The version control icon overlays never seem to be correct, especially with linked-in files. One cause might be commits from external programs.
    • Using source control outside of Xamarin Studio
    • Strange things happen and go nuts if you update from an external program like Versions, Github for Mac, or even command line. Many times I have to close/reopen the solution or restart Xamarin Studio.
    • Needs a supported option to have hotkeys and code formatting identical to Visual Studio
    • It’s OK if it is not possible to get them matching perfectly, but it would be nice if there were a default option to select VS style code formatting and hotkeys. I find myself messing with these settings constantly on new machines and copying Xamarin settings files manually. Many Xamarin developers prefer the VS/Microsoft way.
    • Fix the line endings warning
    • This should happen on file open just like VS, not on file save. Many times my build process is interrupted when I start a build because of this.
    • Can we get full intellisense in the “Expression Evaluator”?
    • Xamarin in Visual Studio
    • Portable Class Libraries
    • Can the Xamarin.Android and Xamarin.iOS installers install the PCL targets for those platforms automatically? I want to add references in VS without unloading the project and editing the project file manually, and I shouldn’t have to mess with VS settings.
    • Fix the update process in VS.
    • It never seems to remember which channel I’m on. Or maybe it is not synchronized with Xamarin Studio.
    • It should use the new VS 2012 updates popup that appears in the task tray.
    • I normally resort to updating in Xamarin Studio (even on Windows), just because it never lets me down. We should get the same experience in VS.
    • Get the Xamarin.iOS plugin a little more stable
    • The Xamarin.iOS plugin can occasionally get stuck in the loading process when opening a project. Closing/reopening the solution is the only fix. I believe it is relating to clicking something in the solution tree while it is in the middle of loading.
    • The process for updating the Xamarin.iOS dlls seems weird and out of place. Can we a unified UI with the standard update process?
    • Xamarin.iOS
    • I get this a couple times per day, generally when I add a breakpoint while debugging an active iOS application. Sometimes on the device, sometimes on the simulator.
    • iOS Console (Rolf Pointed out this exists)
    • Can we have an option to view the console on a device when not debugging? Having to use XCode for this seems unnecessary.
    • Give the user more help with provisioning profile errors
    • New developers can never figure this out.
    • Give a report of the percentage of total Apple APIs that bindings exist for C#.
    • I commonly find obscure ones missing such as [NSString stringByAddingPercentEscapesUsingEncoding]. A public facing percentage would give incentive to bind missing ones without developers having to submit bug reports.
    • It would be great to be able to change the iOS simulator hardware from the top menu in Xamarin Studio.
    • Change from 3.5” to 4” iPhone, for example.
    • Debugger loses connection to device, but no indication in Xamarin Studio.
    • If you debug on a device and let it go to sleep, eventually the debugger disconnects. The problem is that Xamarin Studio leaves it’s button set to a “stop” symbol, and gives no indication of this until you move the mouse. There should be a warning popup in this case, otherwise the developer thinks they are still debugging.
    • Xamarin.Android
    • During daily use with devices, a common “DWP Handshake Failed” error appears (mostly seen in Visual Studio).
    • Unplugging and replugging the device always fixes it. If this is an issue Xamarin can’t fix, it should at least show a nice prompt telling you to do that.
    • Can we have an option for Java binding projects to bind things in an “inclusive” way? instead binding every class and method and fixing the errors?
    • If I were writing an Objective-C binding, I would just write bindings for the classes I’m using (unless Objective Sharpie gets it right first try). If we had a way to do this on Android, we wouldn’t have to write tons of XPath for classes and methods we don’t even plan on using.
    • Files commonly have their default build action set incorrectly when added to a project. For example, AndroidAsset sometimes gets set on a file in the Resources directory. I have mostly seen this in Visual Studio.
    • Can we make “Quick Watch” work a little nicer in Visual Studio? Many times static classes won’t evaluate and someones nothing will evaluate.
    • Add TestFlight support like we have on iOS.
    • Add an official NUnit project just like we have on iOS.
    • And then everyone altogether: “add a profiler!”
  • In General
  • The Activation Process
  • I believe everyone will agree with me that the activation process has been not exactly smooth since Xamarin 2.0. If a Xamarin account login is absolutely required for business reasons, make a native login in Visual Studio and Xamarin Studio. The switch to a browser is strange for a company promoting native UIs, and a native login cannot be that much work. Switching back and forth to the browser commonly does not work properly and sometimes requires a cancel and retry.
  • Bug Reporting
  • Standardize where we should submit bugs. Should we email support? post on Stack Overflow? post on the forums? submit on bugzilla? go on IRC? put a message in a bottle? There should be a native UI in Xamarin Studio and VS that collects version information and emails support.
  • Updates
  • Many times we’ve updated, and we’ve discovered an obscure bug that prevents an app in active development from working. This is probably due to the wide range of different apps my team works on. The bug might be unavoidable, but it would be nice if the updater could “roll back” to older versions even on the beta/alpha channel. Normally I have to resort to guessing the download URL for the old one.
  • NuGet
  • Help them get perfect support for both Xamarin.Android and Xamarin.iOS.
  • Help the most common packages get support for Xamarin.Android and Xamarin.iOS, a mirror of these packages should exist on the Xamarin Component store.
  • Write a tool to convert a NuGet package to a Xamarin Component store package that just drops any PowerShell scripts.
  • Give free licenses to great .Net open source projects
  • There are tons of great C# projects out there that will easily run on Xamarin, but don’t have Xamarin versions. Give those developers some incentive to port and test their projects, so we don’t all have to link-in and compile from source (then comment out stuff that doesn’t build willy nilly).

Again, my goal here is not criticism, as Xamarin tools are absolutely wonderful. I hope I am in a position to point things out and make the experience better for all developers using Xamarin. Several of these are probably more involved than I know, but I want to challenge Xamarin to make their experience even more amazing than it is right now.

If others have their own “tiny cuts”, feel free to comment below or hit me up on Twitter. I will update this list as new ideas arise.


comments powered by Disqus