Rene GensAuthorBlogGitHubLinkedIn
Built a full-stack Kotlin app with Spring Boot backend and KMP mobile clients. The code sharing is impressive. You can share data models…
Managing shared state across multiple SwiftUI views. There are several patterns, each with trade-offs. The simplest is using : But here's…
Compose LazyLayout APIs got some nice improvements. The new composable gives more control. Instead of just and , you can create custom…
Integrating iOS dependencies via CocoaPods in KMP. The setup is smoother than I expected. You configure CocoaPods in your : But here's what…
Xcode 16 added preview macros that make SwiftUI previews easier to write. Instead of wrapping your preview in , you can use the macro: But…
Using Testcontainers for integration tests in Spring Boot. It's great for testing with real databases and services. Testcontainers spins up…
Compose modifiers can be composed and reused, which is powerful but can be confusing. You can create custom modifiers by composing existing…
Had performance issues with ScrollView in SwiftUI. The default behavior doesn't virtualize, which can cause problems with long lists. For…
Trying to share ViewModels between Android and iOS. The challenge is that ViewModel is Android-specific, but the logic can be shared. The…
Tried building Spring Boot apps as GraalVM native images. The startup time is amazing, but there are some gotchas. GraalVM native images…
Compose Compiler can now generate metrics about your composables. It's useful for finding performance issues. You enable it in your build…
iOS 18 brought more macro improvements to SwiftUI. The macro got some nice updates. One thing that's better - you can now use with…
After a year of using KMP in production, here are the main lessons. First, start with business logic sharing, not UI. Sharing data models…
Using in SwiftUI and ran into caching issues. The default behavior doesn't cache images, which causes unnecessary network requests. loads…
Compose Preview got better with parameterized previews. You can preview multiple states easily: But here's what I learned - you can use to…
Tried Spring WebFlux for a real-time feature. The reactive approach works, but mobile clients need some adjustments. WebFlux uses reactive…
Struggling with data flow in SwiftUI. The unidirectional data flow is different from what I'm used to. In SwiftUI, you pass data down and…
Compose introduced a new animations API that's more declarative. The and APIs got updates. The new API uses with transition specs: But…
JetBrains released a KMP plugin that simplifies setup. The configuration is much cleaner now. Instead of manually configuring source sets…
iOS 17 introduced the macro, which replaces and . It's cleaner and easier to use. Instead of conforming to and using , you just mark your…
Setting up authentication for mobile apps with Spring Boot. OAuth2 and JWT work, but there are some mobile-specific considerations. For…
Compose Multiplatform hit 1.0 and it's much more stable than when I first tried it. The iOS support is actually usable now. The setup is…
Working on an iOS app with SwiftUI and ran into navigation issues. NavigationStack replaced NavigationView, but the API is different. With…
Built a Spring Boot backend to support a KMP mobile app. The integration is smoother than I expected. Since both use Kotlin, sharing data…
After months of experimenting with KMP, here are my thoughts on using it in production. The biggest win is sharing business logic and data…
KMP builds are slower than regular Android builds, especially when building for multiple targets. Here's what I learned about optimizing…
Trying to share resources like strings, images, and files in KMP. It's not as straightforward as I hoped. For strings, you can use or…
Writing tests for KMP shared code is different from platform-specific tests. You can write tests once and run them on all platforms. The…
Tried Compose for Web and it's interesting, but definitely experimental. The approach is different from traditional web development. Compose…
Trying to share state management logic between platforms in KMP. The challenge is that UI frameworks are different, but business logic can…
Managing dependencies in KMP is more complex than regular Android projects. Not all libraries support KMP yet, and when they do, the setup…
Built a desktop app with Compose and learned some platform-specific things. First, window management is different. You need to use…
Tried SQLDelight for database access in KMP. It's different from Room, but works well once you get the hang of it. SQLDelight generates…
Set up networking in KMP using Ktor and ran into some platform-specific issues. Ktor works great for shared networking code, but you need to…
Tried Compose Multiplatform to share UI code between Android and iOS. It's promising but has some rough edges. The setup requires Compose…
Started experimenting with Kotlin Multiplatform and hit some roadblocks right away. The setup is more involved than I expected. First thing…
Been profiling my Compose app and found several performance issues. Here are the main things to watch out for. First, avoid unnecessary…
with keys is powerful but easy to misuse. I was using it without keys when I should have been using keys, and vice versa. without keys…
Writing tests for Compose UI is different from testing Views. You use and semantic matchers instead of View matchers. But here's what…
Integrating ViewModels with Compose state took some figuring out. The key is using or to convert LiveData/StateFlow to Compose state. But…
Needed a custom layout that wasn't available in Compose, so I tried to create one using composable. It's more involved than I expected. The…
Animations in Compose were stuttering. After some investigation, found out I was animating values that were changing too frequently. Compose…
Set up Material theming in Compose and dark mode wasn't working properly. The issue was with how I was reading colors. In Compose, you…
Started using Navigation Component with Compose and ran into some issues with state preservation. When navigating between screens, the…
Tried to do a network call inside a composable and it kept firing on every recomposition. That's because composables should be pure…
LazyColumn was stuttering when scrolling. After some profiling, found out I was doing too much work in the item composable. LazyColumn only…
Modifiers in Compose are applied in order, and the order definitely matters. Got burned by this today. I was trying to add padding and then…
Spent way too long debugging why my composable wasn't updating when the state changed. The issue was that I was reading the state inside a…
Writing tests for ViewModels that use coroutines is trickier than I expected. The problem is that coroutines run asynchronously, so your…
App was crashing in release builds with ProGuard enabled. The issue was with Retrofit models. ProGuard obfuscates class names and removes…
Started experimenting with Jetpack Compose and immediately ran into state management issues. In Compose, you need to use to hold state…
Was debugging why some preferences weren't being saved and realized I was mixing and without understanding the difference. is synchronous…
Started using DiffUtil to update RecyclerView items and noticed it was slow with large lists. DiffUtil uses the Myers algorithm to calculate…
Added a logging interceptor and an authentication interceptor to OkHttp, but the auth token wasn't being added to the requests. The issue…
ConstraintLayout chains are powerful but the behavior can be subtle. I had three views in a horizontal chain and wanted them evenly spaced…
DataBinding handles null safety automatically, but I ran into a case where it wasn't working as expected. I had a nullable field in my data…
LiveData observers are lifecycle-aware, which is great, but I ran into an issue where my observer wasn't being called. The problem was that…
Navigation Component is great, but the backstack behavior can be confusing at first. I had a flow where users go from A -> B -> C, and I…
Switched to Material Components and spent half a day trying to figure out why my buttons looked different. The issue was with theming…
Tried to set up a periodic background task with WorkManager and it wasn't running. After some digging, found out that periodic work has a…
Added a new column to an existing Room table and the app kept crashing on startup. Classic migration issue. The problem was that I updated…
Spent way too much time debugging why my network call wasn't completing. The coroutine was being cancelled before the API response came back…
Just started using ViewBinding in a new project and ran into something that took me a while to figure out. I was trying to access views in a…
There was a requirement to fetch nearby data by sending the devices latitude and longitude to a rest endpoint. The location itself wasn’t…
A couple of months ago before Android Lifecycle components where a thing I had a requirement to detect when the application state is in the…
Recently we got custom fonts on Android. So an easy to way to change all the fonts is inside the style.xml, for example if the defined font…
Here is a safe and idiomatic way to the null safe Kotlin operator to check against a value and execute some code. And here is a real word…
With RxJava and chaining operators it is not straightforward how to reuse the previous value of a flatMap operation. The usual way to go…
If you are in the need to see the latest API changes which swagger has generated you will need to run the assets on an HTTP Server. Luckily…
What is the Android lifecycle of an activity. Let’s not deal with Fragments at this point cause they are basically the same but with some…
ne of the most used Design Patterns are Listeners. If you check the wikipedia page you will see that they are categorized as the Observable…
In a recent talk by Dan Lew at Droidcon SF, one of his slide mention “Whatever Retrofit is doing”. He was talking about the creation of…
Some housekeeping again is mandatory, I will move the posts from my website to medium and just reference them on renegens.com, starting with…
Here we are again after a long break. The reason for the break was I was not keen on writing anything that was particular interesting to me…
First tutorial and I will start with a good one. It occurred to me that the pretty little phones we have in our pockets are very good gps…