TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Kotlin Multiplatform for Android and iOS

90 pointsby andraskindlerover 6 years ago

7 comments

oropoloover 6 years ago
In essence, JetBrains has caught up to where Xamarin was prior to the announcement of Xamarin.Forms: the ability from one solution to have separate iOS and Android UI applications with a business logic library shared between the two, all written in C# or F# (the two languages supported by the Mono compiler). The main difference is that one of the vendors actually supports the language in question (Kotlin) as a first-class citizen.<p>And going the other way, there&#x27;s been noise for a couple years that Android apps could be written in Swift, achieving the same effect in reverse.
评论 #17988610 未加载
dglassover 6 years ago
The thing that I still don&#x27;t know about are how would things like data persistence be handled in a cross platform manner?<p>I recently built a kotlin Android app for work, and our architecture is tightly coupled to Android&#x27;s Room database and LiveData objects. Obviously if we build it to be cross platform we wouldn&#x27;t be able to use a Room database or LiveData objects on an iOS device. Would we have to roll our own persistence layer in a cross platform application? Or would we share business logic but still write a persistence layer using platform specific code?<p>It&#x27;s not just persistence too. Any lower level API provided by the platform would still need to be written twice, right? Accessing the camera, the devices GPS location, or anything hardware related still needs an implementation for both platforms. Or would we eventually see libraries that would abstract this layer out, similar to react native?<p>Edit: Another thought...I haven&#x27;t done much iOS development but the whole async nature of Android apps with the UI thread and background threads also seems like it would be a nightmare to deal with in a cross platform way. Does iOS involve a lot of async threads?
评论 #17989463 未加载
评论 #17989407 未加载
jaegerpickerover 6 years ago
Looks great! My biggest concern and one of the reasons I&#x27;m not using Swift or C++ for a cross platform library is that most of the dependencies you (at least I need) need don&#x27;t support those languages (Auth0, Firebase, Crashlytics etc...). So you end up writing more complex code to make that also work. If Kotlin native can bring those types of libraries to be supported it will be huge IMO.
评论 #17988704 未加载
评论 #17989285 未加载
评论 #17988418 未加载
评论 #17987912 未加载
hashrateover 6 years ago
Seems like a gimmick to me.<p>In a nutshell this has the same limitation has Xamarin.<p>The Business Logic is shared , but the UI Logic and the Technical Logic aren&#x27;t shared or not completely.<p>The Xamarin community has been struggling with this issue for half a decade and they ended up re-writting their own rendering engine[0] (similar to Flutter) in C# on top of Xamarin to obtain truly MVVM Cross-Platform Framework.<p>My point here is very simple , getting Kotlin to run on iOS is great, but it&#x27;s somewhat a waste of time because of how much time and effort it would talk to create a Runtime or Rendering Engine to normalize UI&#x2F;UX on differents platforms.<p>[0]<a href="https:&#x2F;&#x2F;github.com&#x2F;AvaloniaUI&#x2F;Avalonia" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AvaloniaUI&#x2F;Avalonia</a>
评论 #18008024 未加载
评论 #17989720 未加载
theWheezover 6 years ago
So, so excited for this. I would love nothing more than to be able to create Model and ViewModel code a domain specific cross platform SDK, and have a View implementation on a platform by platform basis for android, iOS, and web. Possible? I sure hope so!
jaxonduover 6 years ago
What is needed for more adoption is Kotlin SDK for Firebase &amp; AWS.
masterpover 6 years ago
Looks promising!
评论 #17987745 未加载