D
D
Daniyar2020-10-04 09:43:43
Android
Daniyar, 2020-10-04 09:43:43

How is the application compiled on Kotlin under IOS?

Good afternoon! In the summer, I began to study programming in the field of android applications. An idea came up, and I decided to create my first application that would be useful to me and possibly other users, but the question arose about creating such an application on ios, as there are friends and acquaintances who have iPhones. I came across articles about compiling an application. After 3 hours of research, I decided to get the opinions of experienced programmers in this field. I asked a question on CyberForum, but no one really wrote anything. The only good and clear answer was that this is hemorrhoids and it is better to write in swift or c-objective from scratch. I would like to know the opinions in this community and finally decide, since I set myself a deadline before the new year.
My questions are:
1. Is compiling to kotlin/native really a pain?
2. Is compilation difficult?
3. If I already write the code and make the application, can I then compile it? Or do you need to compile from the very beginning of development?
Thanks in advance to all those who took the time to answer my question and write an answer!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2020-10-04
@daniyar_bogdanov

As a person who has worked for more than a year with kmpp at the moment, I can say that you will not pull it. The technology, in principle, is working, but very crude.
Your questions are incorrect. The compilation itself is not that difficult. The development process that will allow it to be implemented is complex. If you just write an application for Android, it will never compile for iOS. Because the libraries and framework are different. To make an application multi-platform, you need to make it like this from the very beginning. And to write in Kotlin for iOS, you have to learn iOS frameworks. There are no materials on Kotlin about this, so you will have to study on Swift and adapt it yourself to Kotlin. It is difficult, there is a wild bunch of rakes. You cannot use the same SwiftUI from Kotlin, you can only use what has an Objective-C api.
In addition, the native has very big problems with the memory model. It is very difficult to write multi-threaded code for two platforms. And multithreading is needed at least for trips to the network and database. If someone tells you "coroutines" - laugh at him, coroutines in the native are single-threaded. Elizarov and co could not implement multi-threaded native coroutines with the current memory model. They said that they had gone to think, they would remake the memory model.
Conclusion : study your android calmly, bring the application to mind. It is difficult and will take you a lot of time. If you want ayos - learn Swift or find a like-minded person :)

V
Vladimir Korotenko, 2020-10-04
@firedragon

1. No normal work, just need to know how
2. press compile or run builder
3. You can. A separate issue is 100 bucks for a developer account per year.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question