I worked with Xamarin for 1 week. Here's my story.

CyberFoxCyberFox ✭✭USMember ✭✭

Hello all who's reading! This is gonna be a cry out from my experience with Xamarin for the last few days. If you're looking for a Q/A post, then move along.
,
From reading around everyone is praising Xamarin to the heavens, and sure enough i tried it out by myself and witnessed things i thought impossible.
After setting a checkbox on the Mac i was able to "pair" it with visual studio. And by some miracle of innovation mono was installed and i saw my iPad on the list of devices. As i witnessed the project deployed the device and running in less than 30 seconds. Something that prior would take me 30 minutes tinkering with XCode's nightmare of codesigning. This must be the future i thought to myself.
,
I remember having worked with this system back in 2015, back when Xamarin was private and charged exorbitant fees. Now few years after the Microsoft acquisition making Xamarin free for everyone i thought there would be less DRM/BS and more non-rich developers working together dealing with the kinks and bugs of Xamarin.
,
I'm taking a slash at Xamarin for my current employer, who's developing an interior design App built on Unity3D. Unity has it's kinks. But looking at the old monolith of 50'000 lines of no mans code, it was apparent that there was a years of technical dept. After the team was laid off, the technical dept finally came haunting. Nobody knew how to even build the project.
Thus, i began looking elsewhere. I remembered an old memory. Xamarin.
,
Since our app is very UI intensive, building with XAML sounds far more appealing. We'd still need 3D though to which i found: UrhoSharp
Running Xamarin.Forms together with UrhoSharp would be the absolute dream solution.
But it's been a week, and all i accomplished was a spinning cube, and it's predecessor, the spinning sofa. What happened? Let's begin!

Xamarin.Forms + UrhoSharp. Let's do this!

Xamarin, while deployment was wonderful initially, turned into a mess of weird and unpredictable errors. Who knew that updating NuGet would render my project inoperable? I didn't. That was 1 day wasted. Searching forums and digging on GitHub error reports all converged to the conclusion that the package update is what caused the problem. huh?
,
Working to get a spinning cube running as simply as possible. I had initially followed the tutorial on UrhoSharp in which you were told to first install the NuGet package, and then (for windows) set an "asset" path. Having no assets yet i proceeded to execute the project and was presented with an exception about missing assets. I guess that was to be expected. I went and created some dummy assets, not having any knowledge about the asset pipeline of this... Urho. I went to study the samples "FormsSample" to be exact. It ran fine on the computer, android and windows. Liberally copying the files from the sample to my project i still couldn't get the program running. Digging further and futher, hours went by. Differences i did find was the .csproj. Mine being 10 lines long which seemed to control the way NuGet packages was handled. In my project packages had this cute little blue NuGet icon. In the sample project they were just traditional references. Which in turn on also meant the presence of the "packages" folder.
So not knowing how one would set up a project in this manner i despised my actions from that point. I went and copied the entire sample project and replaced all the strings in the project with my projects name. I got rid of all the stuff in the project and replaced it with a spinning cube. This worked!
,
I hurried to commit this working code to SVN. And went ahead to getting resources working. (That is showing a textured sofa)
Documentation was misleading and i tried for an entire day to show a .obj file until i arrived at the answer that .obj was not supported, despite the fact the documentation stated it supported existing formats (Whatever that really meant). There was a NuGet package to solve this "UrhoSharp.Tools" had something called "AssetImporter". Spending an hour searching how to use this package. I typed the namespace in C# and nothing showed up. There wasn't even a reference on the list. Wtf? I used a filesystem search and found that inside the packages folder it existed as an executable. No docs stated this. Whatever. I converted it and attempted to run my project.
,
It ran, but it was just a spinning cube. Old code? Looking the internet... again. So seems i have to now, manually right click the project and click "Deploy" to run the program on pc. I never did that before, apparently there is a checkbox for deploy in the build settings that sometimes, by magic unchecks itself. Nice? Anyway, i actually got the sofa spinning. With texture.
,
Time to test on iOS!
This was the time the despair really started to settle. I ran the iOS project. The iPad woke up and my app launched. Except, it was the spinning cube. flips table Why was this the old version? No clue, but i'm not the only guy with this problem it seems. Stackoverflow had many suggestions.
Deploy produced an exception. "Delete bin & obj" Did nothing other than proventing the app from building altogether. So my success was short and now back in the abyss. I tried reverting my code to the earliest version. The last suggestion on the list... New project, migrate code. I really didn't wanna, but now it's done, the app it running. On the computer and iPad.
,
Or should i say it didn't, because the iPad threw and exception:
"Unhandled exception: ". I knew exactly what went wrong (Hint: I hadn't the faintest idea).
Well well. After some more internet, slapping a try/catch block around the guilty line actually helped me to determine the exception details.
,
So we arrive in the now. Because the error looked like this:
"Failed to compile pixel shader PBRLitSolid(DIFFMAP IBL PBR): ERROR: 0:110: 'f' : syntax error: syntax error"
Surprisingly non-cryptic for Xamarin's usual standard.
Anyho, i located the shader in question, guessing that 0:110 means column 0, line 110. > "blank line". Yup. Nothing to be found here.
Internet... Again. Turns out iOS couldn't handle the f "prefix" being not part of the glsl standard. I wouldn't know, i'm not familiar with either. My solution would probably be something akin to having a PBR shader for each platform. If i could find one that runs on iOS that is.
,
Reaching the end i have to reflect. Is this really worth the trouble? So far, almost nothing has worked out of the box, and who if i'll even be able to find that elusive shader, i could try and update UrhoSharp but it depends on a later version of Xamarin, and i remember all too well how that went.
Honestly, i despise Unity3D. I really wanted Xamarin to work. Even if i get the elusive pbr shader working (assuming it exists), is that the end of it? Will i keep getting knocked down by Xamarin's build system? Will i keep spending entire days finding why my project suddenly corrupted itself? I really don't know. I'll try to find that shader, if not, it may be the end of this road.
,
With that my story ends. I hope you enjoyed reading this, as much as i enjoyed writing it. Comments, suggestions, death threats are welcome altogether.

,

~ Foxxy out ~

Tagged:

Best Answers

  • NickANickA ✭✭ US ✭✭
    Accepted Answer
    1. You're post is too long, very few will actually read it
    2. It looks like it's a post to bash Xamarin, and this is a Xamarin site.
    3. You gave it a week. I have 30 years of experience creating software. Never once did I give up after a week
    4. What's your experience level?

    You need to know your tools, and what tool is the best for what you're trying to accomplish. This post leads me to believe you have very little development experience.

    Xamarin is a great tool, but it should be one of many tools in your development toolbox.

    So I'm not sure why you posted this, or what you're looking for, or if you're trying to stir up controversy. Go learn your craft and how to properly architect a project using the proper tools.

  • JamesMontemagnoJamesMontemagno Xamurai US Xamurai
    Accepted Answer

    CyberFox,

    Sorry to hear that you had issues when developing with the UrhoSharp library. It does sound like you had a good experience from first deploy, connecting, and getting your application on to your device. It looks like your key issues here that I will get with the team with this week is around using UrhoSharp with Xamarin apps.

    UrhoSharp is an open source library that works on top of the core Xamarin platform to build 3D experience into your iOS and Android apps. It is one of a few ways to do 3D graphics as both iOS and Android provide native implementations available for Xamarin developers (such as SceneKit and OpenGL (or even OpenTK)). I will work with the team to audit the samples and documentation based on your feedback to see if something it out of date.

    I know there is a lot of documentation on:

    Throughout your process of trying to build the app did you file any issues on the GitHub repo at all or on the documentation pages? I can have the team follow up on those as well.

    When it comes to the project and shaders that you are having issues with, I would love to have the dev team test it out. If you have it in a repo somewhere that we could test that would be great.

    Additionally, based on your needs there are a few other libraries such as MonoGame or Xenko that may work ou: http://www.monogame.net/ http://xenko.com/

    I would love to follow up more with you: You can email me directly: [email protected] to follow up.

Answers

  • NickANickA ✭✭ USMember ✭✭
    Accepted Answer
    1. You're post is too long, very few will actually read it
    2. It looks like it's a post to bash Xamarin, and this is a Xamarin site.
    3. You gave it a week. I have 30 years of experience creating software. Never once did I give up after a week
    4. What's your experience level?

    You need to know your tools, and what tool is the best for what you're trying to accomplish. This post leads me to believe you have very little development experience.

    Xamarin is a great tool, but it should be one of many tools in your development toolbox.

    So I'm not sure why you posted this, or what you're looking for, or if you're trying to stir up controversy. Go learn your craft and how to properly architect a project using the proper tools.

  • CyberFoxCyberFox ✭✭ USMember ✭✭
    edited April 3

    @NickA I'm sorry it turned out this way.
    To answer your points. (Not sure if they were rhetorical, if they were i apologize.)

    1. You're post is too long, very few will actually read it

    You'll get nothing out of it reading it, perhaps other than cementing the fact the you're not the only one dealing these problems.

    1. It looks like it's a post to bash Xamarin, and this is a Xamarin site.

    Yes and yes, making it all the more perfect (And numerous other users have done the same)
    /discussion/89286/xamarin-sucks-lessons-learned-from-weeks-wasted (2017)
    /discussion/47703/xamarin-too-buggy (2016)
    /discussion/41588/how-to-make-forms-stable (2015)
    (Years old, still not solved)

    1. You gave it a week. I have 30 years of experience creating software. Never once did I give up after a week

    Me neither. 30 years of experience is of little relevance since both of us started before Xamarin was out. Does your 30 years of experience mean that you don't have to deal with the kinks of Xamarin? I'm sure one who has worked nonstop with Xamarin for 5 years knows exactly how much of a PITA it is. I'm also not sure if i should stop or continue. My boss however want to see a finished product at some point in the near future.

    1. What's your experience level?

    got my first job in 2013

    ,

    For the lack of a better word all I'm doing is smearing. Everyone points out that Xamarin is the holy grail of cross platform. But let's never mention the fact that during a year long development you'll literally spend months just trying to get the thing to building. I thought Microsoft would brush up on the quality, but sadly Xamarin is still in it's infancy and not production ready. What can we do? Can we as developers make Xamarin better?

    I put this here, so that people would find it.

    I really want to love Xamarin. It's is supposed to be the perfect tool. While nothing it perfect, (except for WPF, albeit not crossplatform) they could at-least try to make it predictable and reliable.
    (In development you never find good tools, you just find tools that suck less, everything has it's kinks and quirks)

    But like you said there are other, tools. Mature tools.
    Thanks for sticking around.

  • CyberFoxCyberFox ✭✭ USMember ✭✭
    edited April 3

    Yes

  • JamesMontemagnoJamesMontemagno Xamurai USForum Administrator, Xamarin Team, Developer Group Leader Xamurai
    Accepted Answer

    CyberFox,

    Sorry to hear that you had issues when developing with the UrhoSharp library. It does sound like you had a good experience from first deploy, connecting, and getting your application on to your device. It looks like your key issues here that I will get with the team with this week is around using UrhoSharp with Xamarin apps.

    UrhoSharp is an open source library that works on top of the core Xamarin platform to build 3D experience into your iOS and Android apps. It is one of a few ways to do 3D graphics as both iOS and Android provide native implementations available for Xamarin developers (such as SceneKit and OpenGL (or even OpenTK)). I will work with the team to audit the samples and documentation based on your feedback to see if something it out of date.

    I know there is a lot of documentation on:

    Throughout your process of trying to build the app did you file any issues on the GitHub repo at all or on the documentation pages? I can have the team follow up on those as well.

    When it comes to the project and shaders that you are having issues with, I would love to have the dev team test it out. If you have it in a repo somewhere that we could test that would be great.

    Additionally, based on your needs there are a few other libraries such as MonoGame or Xenko that may work ou: http://www.monogame.net/ http://xenko.com/

    I would love to follow up more with you: You can email me directly: [email protected] to follow up.

  • CyberFoxCyberFox ✭✭ USMember ✭✭
    edited June 14

    @JamesMontemagno Hello. It's been a while. I didn't think anyone would care so i didn't think to check the forums. But with your apparent eagerness to help me out. Not responding would be sad.

    I abandoned the idea of using Xamarin the day after i made the initial post and reluctantly booted up Unity3D.
    I did try to find a iOS compatible PBR shader, but no luck. Don't know if i will ever try again in another context. I digress.
    I read that Microsoft is working on a project they call ".NET 5" which will apparently unify all the frameworks under one umbrella abolishing .NET Standard, .NET Core, .NET Portable, Mono.NET and finally... Xamarin. So at that point i might drop back to see the state of things.

    UrhoSharp seems quite versatile but, the toughest thing to deal with is... what to call it. "Xamarin Project"?. As mentioned in my story the build process can spontaneously stop working. I have no idea why this would happen or what to even call this phenomenon.

    Funnily enough, all the links you've sent is stuff I've visited several times already.

    So i went with Unity3D. Luckily i found a plugin NoesisGUI that let me build UI in WPF/XAML. And the project set off from there.

    But thank you for the attention, i hope my suffering will somehow be able to improve the scene.

Sign In or Register to comment.