Тёмный

Making Your Android Application Work on iOS | Kotlin Multiplatform Mobile Beta 

Kotlin by JetBrains
Подписаться 75 тыс.
Просмотров 11 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@roger58469
@roger58469 Год назад
49:34 we saw it 🤣🤣🤣 But honestly, great and very valuable talk, thanks for organizing and keep them coming!
@JustTheHighlights
@JustTheHighlights Год назад
New experimental feature from JetBrains. 😆
@tinpham7336
@tinpham7336 Год назад
Where is the next week webinar (from 10/25/22)? Thank you, everyone, amazing works as always!!!
@islamragabmostafa
@islamragabmostafa Год назад
why should i use kmm instead of learning a swift ui ? what make it the pest to android developer to use ?what it give to me so i con use it? as in your video you create the swift ui by your self then create viewmodel so kmm give me the network layer and DB only
@xpopcornx1747
@xpopcornx1747 Год назад
Kotlin 1.7.20 is broken with KMM. All calls to suspend functions return on a background thread even though they were called from a main thread on iOS. The suspend functions in my app internally use default dispatcher. After updating to 1.7.20 all suspend calls get this warning in Xcode: "Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates." On 1.7.10 and before, it always returned on the main thread. Even though IO dispatcher is used on Android it still returns on the main thread as expected, only on iOS and after 1.7.2 is it still in the background thread in the iOS callback.
@michaelndiritu6413
@michaelndiritu6413 Год назад
are you using an observable object in your swift code?
@xpopcornx1747
@xpopcornx1747 Год назад
​@@michaelndiritu6413 Yes but this has nothing to do with my code. This can be reproduced by having a regular suspend function with a withContext default dispatcher block inside it, which is what we are supposed to have to get multithreading to work on iOS.
@eliekarouz6397
@eliekarouz6397 Год назад
I agree that this could be problematic. This is because 1.7.20 has kmm new memory model enabled by default. On Android when you launch the coroutine you use MainScope (Dispatchers.main), so this will tell the coroutines to resume on the main thread when the background work is done. On iOS you don't write that code, i think they are using the Unconfined dispatcher which means the continuation will run on the background thread. I am not sure if they can do better than that, they mentioned that this will be the behavior for the new memory model a year ago...
@eliekarouz6397
@eliekarouz6397 Год назад
If you're targeting iOS 13+, i think you can MainActor, async/await. Didn't try it because we target lower versions but I think it can be useful for u
@xpopcornx1747
@xpopcornx1747 Год назад
@@eliekarouz6397 But I was also using the new memory model prior to 1.7.20 by enabling it in gradle properties and it switched back to main. So there must be something different with it in 1.7.20 compared to the experimental version. Here's another thing: A month ago when I upgraded to Ktor version 2, prior to 1.7.20 the same problem happened. So now I am still using 1.7.10 and the 1.6.8 version of Ktor. I think it's strange that it is intentional that we must always dispatch to main in the callbacks on iOS, but I haven't heard or read anything about it so i don't know if I should just do that and update or wait. Regarding MainActor I have tried the annotations in the view models/observable objects where these functions are called but it didn't do anything, don't know why. Haven't tried async await, I am just using the regular generated callbacks that you get when calling a suspend function from iOS and calling those from view models/observable objects on the main thread.
@ashutoshsoni6473
@ashutoshsoni6473 Год назад
It requires a mac but I don’t have it. So it doesn’t make sense to use KMM :/
@freshtechtips
@freshtechtips Год назад
No it makes, so later when you get mac you can share all your business logic with ios
@grimonce
@grimonce Год назад
@@freshtechtips why would I get a mac anyway, wtf
@freshtechtips
@freshtechtips Год назад
@@grimonce To create applications for apple device Like ios mac tv watch etc... If you don't want then don't buy one
@freshtechtips
@freshtechtips Год назад
Devices*
@JimPekarek
@JimPekarek Год назад
The mac limitation is not really a KMM thing, it's an iOS thing. If you want to develop for iOS, you need a mac, simple as that.
@RaajKanchan
@RaajKanchan Год назад
Hello Admin, I have an existing Android Project which I convert it into KMM. I used Kotlin Multiplatform Shared Module to do the magic but you got stuck due to the error ExperimentalKotlinGradlePluginApi class. Can you please help.
@Kotlin
@Kotlin Год назад
Hi @RaajKanchan, Kotlin Publick Slack is the perfect place to ask your question. Here you go: slack-chats.kotlinlang.org/
@RaajKanchan
@RaajKanchan Год назад
@@Kotlin Thank you so much Admin
@truedwell
@truedwell Год назад
Please Room, be Multiplatform!
@uop6238
@uop6238 Год назад
Please Room, Hilt, Retrofit😢
@amanbansal97
@amanbansal97 Год назад
Room is using KSP, so we can expect that. Otherwise use SQLDelight, superb library
@amanbansal97
@amanbansal97 Год назад
@@uop6238 use Ktor
@uop6238
@uop6238 Год назад
@@amanbansal97 Ktorfit is better
@cedricvillani8502
@cedricvillani8502 Год назад
Not great, I’m to OCD to deal with people that use “Umm and Uhhh” excessively when they speak 🗣️, it’s so distracting and a sign of nervous ignorance about whatever there talking about. In a normal setting it’s fine, but in a professional presentation or Enterprise training, it’s distracting af. Try and listen for it, 😂 it’s all you will hear and probably get on your nerves too. I’m not especially happy about iOS’s hardened version either. dweeb 🎃Happy Halloween 👻 thank bla bla bla for transcription services.
@jakosss
@jakosss Год назад
I'd much rather listen to super experienced engineer with that issue than super experienced marketing specialist who had no technical background. I don't expect all engineers to be awesome speakers but that doesn't change the fact they have something awesome to say
@khalidhamid7448
@khalidhamid7448 Год назад
Make it 1.5x faster then you can tune out that Aaahh aahh. I cannot hear for single minute with that nervous tick voice of Aaahhh
@julianosanm
@julianosanm Год назад
As much as I don't want to complain, specially since this is free, you are right that it can be very distracting. I hope he gets this feedback and work to improve his presentation and speech skills, as this does impact the spread of their work
Далее
Releasing Faster with Kotlin Multiplatform
32:24
Просмотров 13 тыс.
КОТЯТА В ОПАСНОСТИ?#cat
00:36
Просмотров 491 тыс.
Premature Optimization
12:39
Просмотров 810 тыс.
Is Computer Science still worth it?
20:08
Просмотров 332 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 80 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 565 тыс.
Building a Mobile App in 2024: The BEST Technologies
13:31