Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
TheReverend
Jun 21, 2005

So I spend my days writing weirdo niche poo poo for Windows Mobile. Not anything modern like Windows Phone but iPaq style Windows loving Mobile.

To make a long story short, the industry has finally woken up and is making some new hardware that is compatible with iOS and Android! Hooray!

I know the basics of Android. I've made a few cool things as tests/prototypes. I've never even owned an iOS device.

What we're debating is whether or not we want to go the Xamarin route. We'd likely want to have both an Android and iOS application but we kind of think the big popular platform for our users is going to be iPads.

I just don't know enough about Xamarin to see if it's worthwhile. I actually downloaded it in 2012 to play around with and it broke my Eclipse install :(

-What are your experiences using Xamarin?
-Did it really make coding for both environments easier?
-Did your users like the end product.
-What are the limitations?
-Would you recommend it?


C# is my main thing. I'm comfortable with Java. I have never bothered with Objective-C. I don't think learning Obj-C would be a hindrance but I guess I'm trying to benefit the pros of not learning a language and being able to go strait in and make apps for both operating systems versus the pros of writing specifically for each device.

So please share your Xamarin experiences and knowledge!


Note to mods: I made this thread because there is some sprinklings of Xamarin in the .NET thread, the Android thread and I think the IOS thread and thought a unified thread would be a good idea. If it's not, I apologize

Adbot
ADBOT LOVES YOU

Potassium Problems
Sep 28, 2001
I've had nothing but negative experiences with Xamarin. We've had pretty poor support for a decently expensive license, not to mention it's been pretty buggy. I was troubleshooting an issue with a client where an if statement was always evaluating to true when it was the first statement in a try block. Moving the conditional statement outside the try and it executed as expected. After working for a couple of hours, it gives cryptic errors about being unable to build, and I have to restart Visual Studio to get it going again.

The biggest limitation we ran into was when we needed to use reflection. A lot of the reflection APIs aren't supported (The app is strictly Android, no other platforms) and we had to write a lot of extra code to work around it. I would have much rather have developed a native Android app, but since I came into the project during the maintenance phase, the technology & architecture choices were already made.

On the other hand, there are other people at work who use it to develop Android and iOS apps and swear by it, so I'm left wondering if it's just the project I'm working with or if they've yet to run into any major issues.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
Quoting my post from the .NET thread: http://forums.somethingawful.com/showthread.php?threadid=3644791&pagenumber=32&perpage=40#post437668606

Bognar posted:

I've been working with Xamarin + MvvmCross on a decent sized learning-based iPad application for the past 6 months or so. Ultimately, the tooling could be better, but the cross-compilation works exactly as expected.

Developing for iOS necessarily requires some kind of machine running OS X with Xcode. You can develop in Xamarin Studio on the a Mac, or you can set up a Mac with a build server and develop in Visual Studio with a plugin that manages remote compilation and remote debugging (what we did). This piece used to be really buggy and I'd have to reset it every day, sometimes more than that, but it has really improved in the last few months. Every now and then Apple will release an update to Xcode or Xamarin will release an update to the runtime and various things will break - though it's usually fixed within a day.

I haven't really seen any issues with performance. I'm not making 3D games or anything, but I am doing a lot of data manipulation through LINQ which theoretically will create a lot of garbage and cause GC pauses - but really I haven't seen any problems. AFAIK, Xamarin compiles directly to ARM for iOS with capability of calling to iOS APIs, and it compiles to IL for Android which is then JITted. Really, you should be getting as close to native performance as it gets.

The documentation is pretty good, though you can tell a great portion of it was written for iOS 6. I don't have much insight into the Android docs. So a lot of the documentation doesn't reflect the API updates from Apple, but also a lot of the basic stuff hasn't changed so you can still get a lot of useful information.

Overall I've been really happy with Xamarin and would recommend it to anyone looking to do cross platform in C#. Some people consider the price too high, but I would pay it 3 times over to write in C# instead of Objective-C. Now that Swift is out, maybe that's different, but potentially being able to cross compile to Android and reuse all of our business logic code should still be super useful.


Regarding problems with Reflection, I use a little bit in my app and I haven't had any issues. Granted, the PCL profile I'm using has the pared down Reflection API, so it might be easier to implement/have fewer bugs.

Volte
Oct 4, 2004

woosh woosh
I'm using it to concurrently develop an iOS and an Android app. I would never go back (unless someone figured out a way to make Scala work on iOS). I've actually rewritten my previously-MvvmCross app without MvvmCross and I find that is actually a lot more maintainable as a single developer with very limited time and resources. The separation and testability of the MVVM model introduced way too much time overhead (not to mention a too-rigid structure) for me to cope with when under pressure to add features. I ended up using a shared project with all the core functionality inside non-singleton service classes, and a singleton Universe class which holds all the "global" state and service instances, but which can be switched out for a mock one if necessary.

It is buggy at times and I think Xamarin has some serious issues with their support and quality control. I tried Xamarin.Forms, their cross-platform UI library, and it is almost unusable and at the time I last tried it (around August) a lot of the core functionality was marked internal so you couldn't even override it if you needed to. And then they kept releasing feature releases while some extant bugs were stopping the show (like table views on Android displayed cells in a completely random order due to them not understanding how to reuse cells for like three versions). Xamarin Studio is also terrible and I have to restart it every hour because pushing enter at the end of a line starts indenting by like 55 spaces. Also the IDE sometimes splits into two parallel timelines where you are editing a file, saving it, and testing the program only to find that your new features aren't working. 30 minutes of debugging later and you restart the IDE only to find that the file never changed in the first place and the program is doing exactly what it was supposed to be doing 45 minutes ago, and your new changes are just missing.

The technology is invaluable and it'll probably be a Microsoft product in the next few years anyway so none of the problems with Xamarin itself should matter that much in the future, so might as well jump on board now.

Volte fucked around with this message at 16:41 on Nov 22, 2014

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I used it when I was trying my hand at making a GLES mobile game, but I never licensed it. I ended up just not making an ios version. I really don't know much about mobile development (other than java and OpenGL), so I may have been making some sort of weird mistakes that made it so buggy. I remember having to "class SomeClass : java.lang.Object" at some point which is hilarious to me for some reason. I was doing a pet project, so it wasn't worth the trouble. I just used the behemoth that is Android Studio. (You java people are complicated creatures.)

Obviously your situation is different. It might be convenient to have the same code and language if you were making something bigger. I've never used xcode and (now) I loving hate programming for android, so it also might cut your pain in half.

They sent me a cool t-shirt for free though, albeit in the wrong size...

dougdrums fucked around with this message at 22:10 on Nov 24, 2014

feedmegin
Jul 30, 2008

dougdrums posted:

Obviously your situation is different. It might be convenient to have the same code and language if you were making something bigger. I've never used xcode and (now) I loving hate programming for android, so it also might cut your pain in half.

Qt works on both platforms (plus a lot more), with OpenGL support, if you're willing to use C++. :getin:

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I ended up using OpenTK, which is an awesome library. I tend to write programs that are either in-yo-face-4d or cli, so it worked well for my purposes.

luchadornado
Oct 7, 2004

A boombox is not a toy!

Volte's experience is almost exactly what my co-workers say. I was smart enough to say I didn't want a license because I'd be focusing on the backend services so I've avoided most of their hell.

We used Xamarin to build a large, heavily used iOS/Android app at work, and the initial appeal of using C# for everything was quickly lost. Quirks, bugs, spotty support and the black box nature of the abstraction has led to lost productivity. The two guys that are still working with it are strongly considering a rewrite in native languages even though they love C# and work in it almost exclusively.

luchadornado fucked around with this message at 20:34 on Feb 22, 2015

triple sulk
Sep 17, 2014



.

triple sulk fucked around with this message at 18:13 on Jun 21, 2015

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
I'm still using Xamarin with MvvmCross at work and so far it's still working out great. There was some weirdness when I switched over to 64-bit iOS, but that's all cleared up now.

I've played around with Xamarin.Forms, but honestly I don't think you'll ever get around writing the UI for each device. There's just too much little stuff that can be different between the platforms, and even between devices on the same platform. And, inevitably, you'll want to make some per-device tweaks that you just aren't able to do with Forms because the abstraction level is too high.

If you just use Xamarin as a cross compilation tool for C# that interacts with native UI libraries, it works great.

SimonChris
Apr 24, 2008

The Baron's daughter is missing, and you are the man to find her. No problem. With your inexhaustible arsenal of hard-boiled similes, there is nothing you can't handle.
Grimey Drawer
I think Xamarin.Forms is intended to supplement native UI development, not replace it entirely. You can write basic stuff in forms, and switch to native UI's for more complex things. With that in mind, I think it's pretty cool, but I haven't done anything complex with it yet. Are there any specific reasons people consider it so useless? Any pitfalls I should keep an eye out for?

Biggz
Dec 27, 2005

Is there any reason https://github.com/officedev/ews-managed-api would not work in Xamarin?

The part I'm concerned about is the prerequisites ask for A C# compiler to build the DLL files. We recommend Visual Studio 2013, but isn't this what Xamarin does for you?

Hopefully it's not a daft question, but I've not used Xamarin... yet.

Biggz fucked around with this message at 17:54 on Mar 5, 2015

wwb
Aug 17, 2004

I'm not sure in that specific case but in general the C# cross compilation is really cross compilation and not some sort of VM so you have some impedence mismatch. Some facilities -- like reflection.emit -- just don't exist in ObjC / iOS so libraries which rely upon things like dynamic class generation just don't work. Not sure if that does it but things like nhibernate get clipped.

Biggz
Dec 27, 2005

Biggz posted:

The part I'm concerned about is the prerequisites ask for A C# compiler to build the DLL files. We recommend Visual Studio 2013, but isn't this what Xamarin does for you?

To answer my own question this doesn't work in Xamarin. I imported the source code and I got an error about the project targeting .NET 3.5 and not what Xamarin uses (Mono?).

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
You'll have to change the project type to target one of the supported PCL profiles. Xamarin won't work with just a regular class library. While doing that, you could also pick a new target .NET framework.

Decairn
Dec 1, 2007

I was asked this week about porting some software to work on an Android based hardware instead of Windows PC. Source of software is C#. Is there any viable alternative to Xamarin if we want to keep C# rather than do a rewrite?

Mr Shiny Pants
Nov 12, 2012
So I just started with Xamarin, are there any must see tutorials or must have tools?

I've already looked at MVVM cross ( thanks thread ) and it looks pretty good for WPF like application building.

Anything else that might be interesting?

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
If you're doing MvvmCross, look at the N+1 set of tutorials. They're a good introduction not only to MvvmCross, but also to basic Xamarin applications.

http://mvvmcross.blogspot.com/
OR https://www.youtube.com/playlist?list=PLR6WI6W1JdeYSXLbm58jwAKYT7RQR31-W

(What the gently caress SA, why is it so hard to paste in a playlist link?)

Mr Shiny Pants
Nov 12, 2012

Bognar posted:

If you're doing MvvmCross, look at the N+1 set of tutorials. They're a good introduction not only to MvvmCross, but also to basic Xamarin applications.

http://mvvmcross.blogspot.com/
OR https://www.youtube.com/playlist?list=PLR6WI6W1JdeYSXLbm58jwAKYT7RQR31-W

(What the gently caress SA, why is it so hard to paste in a playlist link?)

Well MVVM Cross looks like a good set of libraries to get an application going and the tutorials are wonderful. The guy himself does a good job of explaining everything. Thanks.

I've also read about Xamarin forms and I am wondering what the recommended architecture for apps across the various ecosystems are (MVVM, MVC, do as you please etc etc.).

slush
Jun 23, 2006
Thank you for calling....
I developed a Xamarin+MvvmCross application (it's only released for iOS right now, with Android coming soon, the company outsourced some Indians to do the UI work on it). I had negative experiences at first when we started, but it appears Xamarin started actually listening to customers and fixing tools. Get used to emailing ios@ and android@ with full logs and eventually support engineers will get to know you (and know that you're not emailing over stupid "HOW DO I PROGRAM?" issues). Every issue I've had with the code base has been fixed within a few days. The productivity of the toolset far outweighs it's negatives.

Mr Shiny Pants
Nov 12, 2012
Cool, I was hoping people would have good experiences with the tool.

I've been looking into MVVM Cross and MVVM Light and it looks like Light has nice features like Observable Collection adapters and navigation services while MVVM Cross has awesome tutorials.

So it feels like Cross is more barebones compared to light, is this about right?

slush
Jun 23, 2006
Thank you for calling....
MvvmCross supports Observable Collections for both iOS and Android.

This is an app using MvvmCross and Xamarin, with lots of observable collections.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Mr Shiny Pants posted:

So it feels like Cross is more barebones compared to light, is this about right?

I don't have too much experience with MVVM Light, but my understanding is that it's the opposite. MvvmCross is quite mature at this point.

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

Bognar posted:

I don't have too much experience with MVVM Light, but my understanding is that it's the opposite. MvvmCross is quite mature at this point.

Anytime I've made an app in Xamarin, I would use MvvmCross over light, because it would always have the extra feature/plugin I would need at any given point later in the project. With WinRT proper projects though I would just use AutoFac if I needed an IOC, since it's easier for me to just do binding myself at that point.

Adbot
ADBOT LOVES YOU

Mr Shiny Pants
Nov 12, 2012
I'll take another look, maybe it was an older post on Stackoverflow.

Mr Shiny Pants fucked around with this message at 21:43 on Apr 19, 2015

  • Locked thread