# IceRock Development - Medium

A boundlessly imaginative mobile development team from the depths of Siberia and its capital, the city of Novosibirsk. Let's meet on www.icerockdev.com - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## KMP vs Flutter vs React Native

DevFeed: [KMP vs Flutter vs React Native](<https://devfeed.tech/articles/kmp-vs-flutter-vs-react-native-23907.md>)

Original publisher: [Read original article](<https://medium.com/icerock/kmp-vs-flutter-vs-react-native-cb7d1958fab3?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2023-04-28T03:14:57Z

Content type: comparison

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Flutter](<https://devfeed.tech/topics/flutter.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [React Native](<https://devfeed.tech/topics/react-native.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [flutter](<https://devfeed.tech/tags/flutter.md>), [interface](<https://devfeed.tech/tags/interface.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [react-native](<https://devfeed.tech/tags/react-native.md>)

### AI overview

This article compares Kotlin Multiplatform Mobile, Flutter, and React Native for cross-platform mobile development. It explains that Kotlin Multiplatform can share business logic between Android and iOS while preserving native UIs, whereas Flutter draws its UI on a canvas and React Native maps native components to JavaScript. The article emphasizes that the best choice depends on the project's specific requirements.

### Source excerpt

There is a wide range of options in cross-platform nowadays, among them Flutter, React Native, and, of course, Kotlin Multiplatform Mobile. Which technology should you choose, and why this one? Let's try to clear out! All technologies have their advantages and disadvantages, resolve particular problems, but never all of them. Thus, your choice will depend on specific tasks. Guys from Jetbrains have made an incredible attempt to optimize development costs and reuse the code. Moreover, such reuse is possible not only within one platform but also between different platforms (Android and iOS). If your development team wants to keep native UI for each platform, then Kotlin Multiplatform Mobile is your perfect option. It is due to the fact that Kotlin Multiplatform doesn't do UI at all. It, instead, does business logic for Android and iOS apps. Because of the special configuration of the project, it is possible to make a project that will be compiled in the Android library with specific code for Android, and in the iOS framework with the corresponding code for iOS. From a technical perspective, there are no more problems with using the same code on iOS and Android at the same time. When you debug your code, you only need to edit it once, and changes will happen on both platforms. However, on the native side of applications, it would be better not to share the following: the whole interface; binding the interface to the shared Viewmodel from the shared code library; platform-specific features: work with camera, NFC, Touch ID, or Bluetooth. And in any case, sharing UI code across platforms is not necessary. This usually requires several iterations to make the user UI and behave more natively. This, in turn, requires additional development cycles. Flutter uses canvas from native SDK of different platforms and draws its UI component on that canvas using Material design specifications. React Native uses native components mapped to js code. React makes it possible to update the

## Profiling and Optimization Techniques for Jetpack Compose Apps

DevFeed: [Profiling and Optimization Techniques for Jetpack Compose Apps](<https://devfeed.tech/articles/optimize-or-die-profiling-and-optimization-in-jetpack-compose-23910.md>)

Original publisher: [Read original article](<https://medium.com/icerock/optimize-or-die-profiling-and-optimization-in-jetpack-compose-a165c8897b3f?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2023-04-28T03:14:45Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Android](<https://devfeed.tech/topics/android.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [GPU](<https://devfeed.tech/topics/gpu.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [compose-compiler](<https://devfeed.tech/tags/compose-compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>)

### AI overview

This tutorial uses the Campus student schedule app to explain profiling and optimization techniques for Jetpack Compose. It covers excessive recompositions, Compose Compiler Metrics, CPU and GPU profiling, and Android Studio's Recomposition Counts tool.

### Source excerpt

Your brand-new app gets bombarded with user complaints on Google Play about it hanging or slowing down? Follow the tips in this article to fix it. Hello! My name is Sergey Panov, and I am a mobile developer at IceRock. Today, I will be using our Campus app as an example to demonstrate profiling and optimization techniques for Jetpack Compose. Campus is an app that allows students to view their class schedule. Its main feature is the schedule screen consisting of two pagers for weeks and days. When users tried to swipe them, it caused the app to hang, but we managed to fix it. Here are the topics discussed in the article: Recomposition Counts. Pinpointing Excessive Recompositions. Compose Compiler Metrics. Identifying the Root Causes of Excessive Recompositions. CPU Profiling. Finding "Hot" Methods and Freeing up the CPU. GPU Profiling. Learning Which Components Take a Long Time to Draw. More Tips on Fixing Bugs Identified with Profiling Tools. Recomposition Counts. Pinpointing Excessive Recompositions Issue. The first concept we need to highlight is that of recomposition. Rendering a screen in Compose consists of traversing the graph of composable functions. If a graph node changes its state (i.e. arguments of a composable method, values of MutableState or animations change), the subgraph is updated, that is, the functions are called again. Such an update is called a recomposition. Recompositions are fast and should not present any issues, but frequent recompositions can cause an app to slow down. This is a distinctive feature and a pitfall of Compose. After all, a developer can make some mistakes leading to excessive recompositions, for instance, recreate an object instead of reusing it. This results in unnecessary computations and performance issues. Solution. In large projects, these mistakes might be tricky to detect by the unaided eye, so Android Studio provides our eyes with an aid -- a tool called Recomposition Counts. It can be enabled in Layout Inspector to

## Prototyping as a Quick and Cost-Effective Way to Test Hypotheses

DevFeed: [Prototyping as a Quick and Cost-Effective Way to Test Hypotheses](<https://devfeed.tech/articles/prototyping-as-a-quick-and-cost-effective-way-to-test-hypotheses-23911.md>)

Original publisher: [Read original article](<https://medium.com/icerock/prototyping-as-a-quick-and-cost-effective-way-to-test-hypotheses-7ee185ef9095?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2023-04-28T03:14:33Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [App](<https://devfeed.tech/topics/app.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [interface](<https://devfeed.tech/tags/interface.md>), [ios-app-development](<https://devfeed.tech/tags/ios-app-development.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [prototype](<https://devfeed.tech/tags/prototype.md>), [prototypes](<https://devfeed.tech/tags/prototypes.md>), [prototyping](<https://devfeed.tech/tags/prototyping.md>), [ui-design](<https://devfeed.tech/tags/ui-design.md>)

### AI overview

This article explains how IceRock uses wireframe and design prototypes to evaluate mobile app ideas, clarify navigation and functionality, demonstrate interfaces to clients, and support testing before development. It contrasts clickable prototypes with screen maps and describes low- and high-fidelity approaches.

### Source excerpt

Businesses are always looking for ways to launch apps quickly and with minimal development costs. There are various ways to do this: sketch your app design, launch apps from scratch with frameworks, or use builders. Different situations call for different solutions. In this article, I will tell you about the approaches we use at IceRock. Our company specializes in outsource development of mobile apps, so we constantly look for new ways to speed up the development and enhance tried-and-true workflows. Why a Prototype is Better than a Screen Map Before we start the development, we prepare one or several prototypes of the future app. This is more efficient than going straight to design or starting to develop the app right away. A screen map is a set of images showing all app screens and their relationships. It visualizes the flow of the screens, but it doesn't allow you to get a feel for the result and understand how usable the interface will be. In other words, it is less illustrative. Clickable prototypes are more informative. We divide prototyping into two parts: we use a "wireframe prototype" before the design, and a "design prototype" after. A wireframe prototype is a schematic prototype that helps us understand the navigation and functionality aspects of an app. A design prototype is a product assembled once the UI design is complete. It is used to demonstrate the future app to the customer, for marketing purposes, and sometimes for testing. It also shows the developers how the final app is supposed to work. After the design, we make a clickable prototype. The level of detail in this prototype can vary according to the client's needs: it can be low-fidelity or high-fidelity. Low-fidelity prototypes consist of static images with active links to the next screens on the buttons. This is the type of prototype we used for the Snow4u project. High-fidelity prototypes are very similar to the app and fully interactive: you can type any text in the input fields, there are

## Why Businesses Choose Kotlin Multiplatform Mobile: Native UI and Improvement Potential

DevFeed: [Why Businesses Choose Kotlin Multiplatform Mobile: Native UI and Improvement Potential](<https://devfeed.tech/articles/why-businesses-choose-kotlin-multiplatform-mobile-native-ui-and-improvement-potential-23912.md>)

Original publisher: [Read original article](<https://medium.com/icerock/why-businesses-choose-kotlin-multiplatform-mobile-native-ui-and-improvement-potential-c9093455552b?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2023-04-28T03:13:53Z

Content type: article

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [buisness](<https://devfeed.tech/tags/buisness.md>), [development](<https://devfeed.tech/tags/development.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-multiplatform-mobile](<https://devfeed.tech/tags/kotlin-multiplatform-mobile.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [native](<https://devfeed.tech/tags/native.md>)

### AI overview

This case study describes how a team used Kotlin Multiplatform Mobile to build Moika-Moika, a car wash search app for Ucar with Android and iOS versions. The app combines map-based search, current car wash information, user-specific pricing, service selection, and in-app payment.

### Source excerpt

In most cases, entrepreneurs have an idea for what they would like an app to do, but are uncertain as to what technology would make it efficient, user-friendly and cost-effective. As experts in Kotlin Multiplatform Mobile, we will use this article to explore how this technology helped us create Moika-Moika ("Carwash-Carwash" in Russian) -- a car wash search app for the Ucar company, and how our client benefited from it. What the client wanted The app had been commissioned by Ucar, a car wash marketplace. Since we had had prior relationship with Ucar, the client was already familiar with our approach and came to us specifically looking to take advantage of our expertise in KMM with plans to create two versions of the app -- Android and iOS. The product was supposed to solve the problem of access to car washes -- the idea was to create something like Uber, but for car washes. At the same time, we needed to incorporate the client's backend with up-to-date information on car washes in the area, such as operation hours, prices and promotions, as well as to set up a feature for service selection aтв payment. The app was intended primarily for cab drivers, carsharing service providers, and commercial vehicle drivers. We also included a separate set of features for private car owners. How we made searching for car washes convenient The app helps car owners find the most suitable car wash on the map in terms of location, price and current promotions. For this we developed several features and provided access to up-to-date information. Moika-Moika shows car washes on the map with all the necessary information: working hours, prices, promotions, and free capacity status. The app chooses rates depending on whether the user is a taxi driver or a regular car owner. Users can pay for the services straight away in the app. This way, when they arrive at the car wash, the employees are already aware of which services they are supposed to provide and can identify the client's car by the

## Faster Development at a Lower Cost. Migration to Kotlin Multiplatform Mobile

DevFeed: [Faster Development at a Lower Cost. Migration to Kotlin Multiplatform Mobile](<https://devfeed.tech/articles/faster-development-at-a-lower-cost-migration-to-kotlin-multiplatform-mobile-23903.md>)

Original publisher: [Read original article](<https://medium.com/icerock/faster-development-at-a-lower-cost-migration-to-kotlin-multiplatform-mobile-4f27518b99a5?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2023-04-28T03:13:33Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Development](<https://devfeed.tech/topics/development.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [app](<https://devfeed.tech/tags/app.md>), [app-development](<https://devfeed.tech/tags/app-development.md>), [code](<https://devfeed.tech/tags/code.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ios-app-development](<https://devfeed.tech/tags/ios-app-development.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-multiplatform-mobile](<https://devfeed.tech/tags/kotlin-multiplatform-mobile.md>), [migration](<https://devfeed.tech/tags/migration.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

### AI overview

This article explains when and how to migrate existing Android and iOS applications to Kotlin Multiplatform Mobile. It outlines migration scenarios, potential budget and development-time benefits, and examples involving shared business logic.

### Source excerpt

Kotlin Multiplatform Mobile is a multiplatform tool that allows you to write universal code for iOS and Android, while saving up to a third of your budget and speeding up the development by 25%. But what if you already have a project, and you want to migrate to KMM? In this article we talk about what type of multiplatform migration costs $1300, $6000 and $40000. When should you integrate KMM? You can migrate to Kotlin Multiplatform Mobile both at the start of your development and at the implementation or launch stage. In order for the migration to make sense, one or more of the following conditions should apply: You already have an app for multiple platforms, Android and iOS, or you have just started developing such an app. Your app with Android and iOS versions has a complex business logic but a simple UI. For instance, it uses offline synchronization. You already have an Android app in Kotlin, but you urgently need an iOS version which utilizes your previous work. 60% of developers use or have tried Kotlin Multiplatform in production according to this recently published survey by JetBrains.What are the benefits of KMM integration? It can potentially save you up to a third of your budget. This is mainly because you develop a common code base for two platforms, Android and iOS, which can be done by a single developer. You can speed up your development by 25% and implement new features on both platforms faster and easier in the future. The projects will behave identically on these platforms without any discrepancies in minute details or complex cases. iOS and Android developers will share the context, which will allow them to understand each other's code in any part of the business logic and to promptly improve and fix it. These might be the reasons why over 75% of those who have played around with Kotlin Multiplatform are considering to use it for their production projects.How does KMM migration occur? The process of migrating to KMM depends on your current situatio

## Maximizing Mobile Code Reuse with Compose Multiplatform and MOKO Libraries

DevFeed: [Maximizing Mobile Code Reuse with Compose Multiplatform and MOKO Libraries](<https://devfeed.tech/articles/maximizing-mobile-code-reuse-with-compose-multiplatform-and-moko-libraries-23908.md>)

Original publisher: [Read original article](<https://medium.com/icerock/maximizing-mobile-code-reuse-with-compose-multiplatform-and-moko-libraries-140a408b452a?source=rss----b74ae24564e---4>)

Author: Aleksey Mikhailov

Published: 2023-04-13T06:46:01Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Development](<https://devfeed.tech/topics/development.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Code](<https://devfeed.tech/topics/code.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [biometric-authentication](<https://devfeed.tech/tags/biometric-authentication.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [geolocation](<https://devfeed.tech/tags/geolocation.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-multiplatform-mobile](<https://devfeed.tech/tags/kotlin-multiplatform-mobile.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ui-framework](<https://devfeed.tech/tags/ui-framework.md>)

### AI overview

This article explains how Compose Multiplatform can share Kotlin UI code across Android, iOS, Desktop, and experimental Web targets. It describes its declarative UI capabilities and limitations for non-UI mobile features, then presents MOKO Kotlin Multiplatform Mobile libraries as a way to address features such as permissions, geolocation, and biometric authentication.

### Source excerpt

Mobile application development can be a complex and time-consuming process, requiring developers to write separate code for each platform they want to target. To help streamline this process, JetBrains recently released Compose Multiplatform, a UI framework that allows developers to write UI for Android, iOS (Alpha), Desktop, Web (Experimental) in Kotlin common code. While Compose Multiplatform is a powerful tool for creating cross-platform user interfaces, it has some limitations when it comes to handling non-UI mobile features like permissions, geolocation, and biometric authentication. To address these limitations, developers can turn to the MOKO libraries, a set of Kotlin Multiplatform Mobile (KMM) libraries that are designed to work seamlessly with Compose Multiplatform. What Compose Multiplatform Allows You to Do Compose Multiplatform provides a powerful UI framework that enables developers to create consistent and responsive user interfaces across multiple platforms using Kotlin common code. This means that developers can write a single codebase that can be used to create UIs for both Android and iOS platforms. With Compose Multiplatform, developers can use a declarative approach to build UI components, making it easier to create complex UIs with less code. Compose Multiplatform also provides support for animations, theming, and custom layouts, making it a versatile and flexible tool for creating cross-platform UIs. Starts from Compose Multiplatform 1.4.0 all material ui that was developer for Android now available for iOS too. What Compose Multiplatform Does Not Do While Compose Multiplatform is a powerful tool for creating cross-platform user interfaces, it has some limitations when it comes to handling non-UI mobile features like permissions, geolocation, and biometric authentication. For example, Compose Multiplatform does not handle Android configuration changes. Additionally, Compose Multiplatform does not provide built-in support for requesting runtime

## MOKO resources 0.21 with Compose Multiplatform support

DevFeed: [MOKO resources 0.21 with Compose Multiplatform support](<https://devfeed.tech/articles/moko-resources-0-21-with-compose-multiplatform-support-23909.md>)

Original publisher: [Read original article](<https://medium.com/icerock/moko-resources-0-21-with-compose-multiplatform-support-462d8b11116b?source=rss----b74ae24564e---4>)

Author: Aleksey Mikhailov

Published: 2023-03-25T15:49:09Z

Content type: article

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Library](<https://devfeed.tech/topics/library.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [build](<https://devfeed.tech/tags/build.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [library](<https://devfeed.tech/tags/library.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial explains how MOKO resources 0.21.0 adds Compose Multiplatform support to a Kotlin Multiplatform resource library. It demonstrates accessing images, fonts, localized strings, colors, assets, and files from shared code, including a simple UI example.

### Source excerpt

MOKO resources is a multiplatform Kotlin library that provides a convenient way to access resources like images, colors, strings, and fonts in your Kotlin Multiplatform projects. With the release of version 0.21.0, MOKO resources now includes support for Compose Multiplatform, allowing developers to easily access resources across all supported platforms. One of the key benefits of using MOKO resources with Compose Multiplatform is the ability to easily use fonts, colors, and images in your UI. With the fontFamilyResource, colorResource, and painterResource functions provided by MOKO resources, it's easy to reference resources from your shared code. In this article, we'll take a closer look at how to use MOKO resources with Compose Multiplatform, and how it can help you build better multiplatform applications. Usage MOKO resources provides several functions for accessing resources like images, colors, strings, and fonts. Here's a brief overview of how to use each of these functions: ImageResource To display an image in your Compose Multiplatform UI, use the painterResource function with the ID of the image resource you want to use: Image( painter = painterResource(MR.images.logo), contentDescription = null )FontResource To use a custom font in your Compose Multiplatform UI, use the fontFamilyResource function: Text( text = "Hello, World!", fontFamily = fontFamilyResource(MR.fonts.custom_font) )StringResource To display a localized string in your Compose Multiplatform UI, use the stringResource function with the ID of the string resource you want to use: Text(text = stringResource(MR.strings.hello_world))ColorResource To set the color of a Compose Multiplatform component, use the ColorResource class with the ID of the color resource you want to use: Text( text = "Hello, World!", color = colorResource(MR.colors.background) )AssetResource To load the contents of an asset file in your Compose Multiplatform UI, use the AssetResource and extension function: val assetConten

## How to use Kotlin Multiplatform ViewModel in SwiftUI and Jetpack Compose

DevFeed: [How to use Kotlin Multiplatform ViewModel in SwiftUI and Jetpack Compose](<https://devfeed.tech/articles/how-to-use-kotlin-multiplatform-viewmodel-in-swiftui-and-jetpack-compose-23905.md>)

Original publisher: [Read original article](<https://medium.com/icerock/how-to-use-kotlin-multiplatform-viewmodel-in-swiftui-and-jetpack-compose-8158e98c091d?source=rss----b74ae24564e---4>)

Author: Aleksey Mikhailov

Published: 2022-04-30T12:34:48Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [SwiftUI](<https://devfeed.tech/topics/swiftui.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>)

Tags: [android-studio](<https://devfeed.tech/tags/android-studio.md>), [cocoapods](<https://devfeed.tech/tags/cocoapods.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swiftui](<https://devfeed.tech/tags/swiftui.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A tutorial showing how to use a shared Kotlin Multiplatform ViewModel with SwiftUI and Jetpack Compose. It uses MOKO MVVM 0.13.0 and demonstrates building an authorization screen for Android and iOS.

### Source excerpt

We at IceRock Development have been using the MVVM approach for many years, and the last 4 years our ViewModel are shared in the common code. We do it by using our library moko-mvvm. In the last year, we have been actively moving to using Jetpack Compose and SwiftUI to build UI in our projects. And it require MOKO MVVM improvements to make it more comfortable for developers on both platforms to work with this approach. On April 30, 2022, new version of MOKO MVVM -- 0.13.0 was released. This version has full support for Jetpack Compose and SwiftUI. Let's take an example of how you can use ViewModel from common code with these frameworks. The example will be simple -- an application with an authorization screen. Two input fields -- login and password, button Log in and a message about a successful login after a second of waiting (while waiting, we turn the progress bar). Create a project The first step is simple -- take Android Studio, install Kotlin Multiplatform Mobile IDE plugin, if not already installed. Create a project according to the template "Kotlin Multiplatform App" using CocoaPods integration (it's more convenient with them, plus we need it to connect an additional CocoaPod later). git commit Login screen on Android with Jetpack Compose The app template uses the standard Android View approach, so we need to enable Jetpack Compose before implementation of UI. Enable Compose support in androidApp/build.gradle.kts: val composeVersion = "1.1.1"android { // ... buildFeatures { compose=true } composeOptions { kotlinCompilerExtensionVersion = composeVersion } } And we add the dependencies we need, removing the old unnecessary ones (related to the usual approach with view): dependencies { implementation(project(":shared")) implementation("androidx.compose.foundation:foundation:$composeVersion") implementation("androidx.compose.runtime:runtime:$composeVersion") // UI implementation("androidx.compose.ui:ui:$composeVersion") implementation("androidx.compose.ui:ui-tooling

## How to implement Swift-friendly API with Kotlin Multiplatform Mobile

DevFeed: [How to implement Swift-friendly API with Kotlin Multiplatform Mobile](<https://devfeed.tech/articles/how-to-implement-swift-friendly-api-with-kotlin-multiplatform-mobile-23904.md>)

Original publisher: [Read original article](<https://medium.com/icerock/how-to-implement-swift-friendly-api-with-kotlin-multiplatform-mobile-e68521a63b6d?source=rss----b74ae24564e---4>)

Author: Aleksey Mikhailov

Published: 2021-08-07T16:49:33Z

Content type: tutorial

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [enum](<https://devfeed.tech/topics/enum.md>), [Code](<https://devfeed.tech/topics/code.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [enum](<https://devfeed.tech/tags/enum.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-multiplatform-mobile](<https://devfeed.tech/tags/kotlin-multiplatform-mobile.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [sealed-interface](<https://devfeed.tech/tags/sealed-interface.md>), [swift](<https://devfeed.tech/tags/swift.md>)

### AI overview

This tutorial explains how Kotlin Multiplatform Mobile exposes Kotlin APIs to Swift through generated Objective-C APIs. It demonstrates usability issues with sealed interfaces at the Kotlin-Swift boundary and introduces IceRock's MOKO KSwift Gradle plugin, which analyzes Kotlin/Native library metadata to generate a more convenient Swift API.

### Source excerpt

Kotlin Multiplatform Mobile allows you to compile Kotlin code into native libraries for Android and iOS. If in the case of Android the library obtained from Kotlin will be integrated with an application written in Kotlin, then for iOS the integration will be with Swift. There is a loss of usability at the junction of Kotlin and Swift, due to the difference in languages. This is mainly because the Kotlin/Native compiler (which compiles Kotlin in the iOS framework and is part of the Kotlin Multiplatform) generates the public API of the framework in ObjectiveC. We access Kotlin from Swift through this generated ObjectiveC API, since Swift interacts with ObjectiveC. Further, I will show examples of API waste at the Kotlin-Swift junction and a tool that allows you to get a more convenient API for usage from Swift. Let's look at the example of using a sealed interface in Kotlin: sealed interface UIState<out T> { object Loading : UIState<Nothing> object Empty : UIState<Nothing> data class Data<T>(val value: T) : UIState<T> data class Error(val throwable: Throwable) : UIState<Nothing> } This is a convenient construct to describe states, which is actively used in the Kotlin code. Let's see how it looks from the Swift side. public protocol UIState { }public class UIStateLoading : KotlinBase, UIState { }public class UIStateEmpty : KotlinBase, UIState { }public class UIStateData<T> : KotlinBase, UIState where T : AnyObject { open var value: T? { get } }public class UIStateError : KotlinBase, UIState { open var throwable: KotlinThrowable { get } } From the Swift side Kotlin's sealed interface looks like a set of classes with a common protocol. Of course, in this case, one cannot hope to check the completeness of the switch implementation, since it is not an enum. For developers familiar with Swift, the enum is considered a more correct analog of the sealed interface, for example: enum UIState<T> { case loading case empty case data(T) case error(Error) } We can write such an enum

## How We integrated Kotlin Multiplatform Into Profi

DevFeed: [How We integrated Kotlin Multiplatform Into Profi](<https://devfeed.tech/articles/how-we-integrated-kotlin-multiplatform-into-profi-23906.md>)

Original publisher: [Read original article](<https://medium.com/icerock/how-we-integrated-kotlin-multiplatform-into-profi-c497059f2f48?source=rss----b74ae24564e---4>)

Author: IceRock Development

Published: 2021-06-28T07:43:15Z

Content type: article

Language: en

Sources: [IceRock Development - Medium](<https://devfeed.tech/sources/icerock-development-medium.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Development](<https://devfeed.tech/topics/development.md>), [Flutter](<https://devfeed.tech/topics/flutter.md>), [React Native](<https://devfeed.tech/topics/react-native.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [development](<https://devfeed.tech/tags/development.md>), [flutter](<https://devfeed.tech/tags/flutter.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [react-native](<https://devfeed.tech/tags/react-native.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [swift](<https://devfeed.tech/tags/swift.md>)

### AI overview

Profi.ru describes its adoption of Kotlin Multiplatform for Android and iOS mobile apps, including the reasons for choosing it, the integration process, and the division between shared business logic and native UI. The article states that the team has used Kotlin Multiplatform in production since 2019 and that more than 70% of its application code is platform-independent.

### Source excerpt

How We Integrated Kotlin Multiplatform Into Profi Hi, guys, it's IceRock team. So great to get feedback from customers. This time guys from Profi.ru wrote an article. Hope their experience will be useful and inspiring for you. Hello! My name is Mikhail Ignatov, and I am a team lead at Profi. My team is responsible for client-side mobile apps for Android and iOS. We have been using Kotlin Multiplatform in production since 2019. Let me tell you about why we chose this particular technology, how we integrated it, the key stages that we went through during the process, and the conclusions we reached in the end. Kotlin Multiplatform Kotlin Multiplatform allows users to run the same Kotlin code on multiple platforms. In August of 2020, JetBrains introduced Kotlin Multiplatform Mobile (KMM), an SDK that facilitates the use of shared code across Android and iOS. The purpose of the technology is to extract business logic while the UI layer remains native, which is good for a better user experience and the look and feel of the apps. Why We Chose Kotlin Multiplatform We studied various cross-platform technologies. For example, React Native and Flutter allow to program and develop a feature for both platforms at the same time, but they narrow the choice of programming language and libraries. We chose Kotlin Multiplatform for three reasons. Ease of integration The common code written in Kotlin can be injected with minimal effort into a finished application. It then compiles into platform-familiar libraries. In the case of Android, it is a jar or aar library, while for iOS, it is a Universal Framework. The connection process and further work does not differ from interacting with any native library. The Kotlin language's syntax is close to Swift The similarity of the language lowers the entry barrier for iOS developers. Both languages share a similar ideology focused on development speed and usability. Anyone on the team can understand what is going on in the common code and adj