The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I've been working on and off for the past year in trying to write a small mobile app to help my training at the gym. It's stupid simple what I'm after, but I've been trying to avoid going the easy (aka hard) route of separate iOS and Android apps. Because I like to complicate things and yet I'm lazy and super short on time.
I have a Windows Form version, which I ported to a Vue/Typescript web app. I'd like to stick to either .NET or TypeScript as my language of choice.
It seemed Xamarin would be sensible given that it allows me to stay in C#. Except my experience with Xamarin hasn't been great and it seems Microsoft is pushing React Native for UWP apps. So why not Reach Native? Porting Vue to React/RN is simple enough and I'll simply stick with TypeScript as my core language and I'm done.
Except that I cannot, for the life of me, get anything to work. I've forked GitHub repos that have "complete apps". I've walked through, line by line, the official docs on Facebook. I've spent the hour installing the Android SDKs, node, gradle, chocolatey, yarn, react native, etc etc etc. GB worth of installs. Endless command lines. Opening a powershell window in Admin mode to run the ps1 scripts. Manually adding the environment variables.
I can't believe that 13 years after the iPhone was released we're still in the string and ducttape era of cross platform mobile development.
Once I get this working and boiled down to something sensible I'll write an article.
I've dealt with a few android apps using Android Studio, and each was a mess. Emulators either didn't function, or were pathetically slow/limited. Countless re-installations later, I opted to do live debugging on my phone and ditch emulation.
The one experience with Android apps that went smoothly involved a game I made in Unity3D. Got to keep the C# love, and it compiled for Android and ran without hassle.
im guessing you were running on windows. ihad an i7 8GB machine and it wasnt enough under windows
i recently upgraded my machine entirely so i could run Android Studio and emulator.
However i went back to the older machine and installed Ubuntu and Andrioid Studio and found that bec Linux OS uses so much less RAM (1.2GB base v windows 4-5 GB base) that i could run Studio and emulator on Linux.
The emulator constantly ran out of RAM on windows.
Yeah, it was a Win PC. I don't recall the specific issue in my case, but it ran like hot garbage on both my i3 and i7 laptop, 8g and 16g respectively. Once it ran so well on the live device, I just gave up on the troubleshooting.
ive developed a couple apps natively on Android (java via Android Studio) and iOS (swift via XCode).
XCode / iOS dev is such an odd beast, slow and unwieldy, with odd constructs.
Android Dev is so much nicer.
i often dream of writing apps in one language (especially C# ) but alas for anything except straight data driven apps that display data in basic forms Xamarin doesnt buy you much.
i keep trying Xamarin but it's yet another paradigm to learn and you really cant do extended things like connect to iot etc very easily.
The dream of code once build everywhere still doesnt quite exist. google is trying it based upon HTML5 via Flutter (flutter.io)
I'm surprised because you can't believe that 13 years after the iPhone was released we're still in the string and ducttape era of cross platform mobile development, because after many more years cross platform desktop development is still very complicated. And after many, many more years, cross platform host development is still very complicated despite the fact that their most widespread language, COBOL, was born with an environment section to solve cross platform problems.
So I'd like to know what platforms you're comparing mobiles to: Abacuses?
Sorry, it is just a joke. What I mean is that we have to be aware that cross platform development is a very ambitious challenge. But it is also true that we are now much more concerned about cross platform development: We put more effort into it than in the past and have the experience of trying it for so many years.
Going into the subject, there are two main ways to achieve multi-platform applications:
1) Develop a single application that looks and works exactly the same on all platforms. The question is why there are different platforms if we end up building a dull identical application on all of them.
2) Develop an application that shares almost all the code but allows adapted code to take advantage of the special features of each platform. For me this is the right way to cross platform development and it's the one that Xamarin took.
Of course, Xamarin is not perfect and it has a tough learning curve if we want to succeed, but it is worth the effort as long as there is nothing better.
I'm starting to test the UNO platform and so far it's doing very, very well in the trials, but I cannot recommend it until I develop and test something real (UNO platform uses inside Xamarin infrastructure and ideas to some extent).
It should be added that both Xamarin and UNO platform allow cross platform development not only for mobiles, but also for desktops (UNO platform also includes WebAssembly browsers).
NOTE. There may be better environments for cross platform development, but C# coding is essential for me.
I agree that #2 is the best approach. I'm not debating that the task of cross platform development isn't tricky. What bothers me most is we have lots and lots and lots of tools. However, with the exception of Xamarin there doesn't seem to be a solution that ties everything together and hides the bare wires.
Xcode, for instance, manages development for at least 5 platforms (iOS, iPadOS, macOS, watchOS, tvOS) and handles all the messing around with certificates and signing, packaging and deploying, coding and testing and emulators.
Visual Studio is just as complete while also having the huge tie in to Azure services, database services, the whole shebang all in one IDE that just works.
Android Studio...well, that's a bit of a mess but it gets the job done. For Android.
And then there is the rest. ReactNative, PhoneGap, Flutter. They all require you to download (and self-manage) a bunch of tools, which in turn will allow you to install a bunch of tools, which in turn will allow you to manage libraries to include in your apps. Gradle, npm, node, yarn, all the CLIs, and too bad if you get the versions mismatched. And then you have to manage the Android SDK versions, and then connect to a mac device (if you're not actually on a mac).
This is before you've written a single line of code.
I guess it comes down to
a) Google doesn't care about Apple, Apple doesn't care about Google. They have no incentive to make things easier for each others' devs.
b) Microsoft cares about how many devs it can get using Azure, so it will make it easy for devs to write to both OSs in the hope they'll use Azure for the backend services
c) No one else has the industry leverage to pull everyone else in line and keep things in sync. It's a hodge-podge of developers writing their own systems in isolation because everything else sucks (in their opinion). The fact that there are so many frameworks out there, all so similar, speaks volumes. The road is littered with abandoned betas.
Last Visit: 23-Feb-20 23:58 Last Update: 23-Feb-20 23:58