Intro In the previous article Internationalization (I18n) in Kotlin Multiplatform, we explored how to modularize the :i18n module using Moko Resources for handling string resources across platforms.
In this follow-up article, we’ll dive deeper into:
Implement dynamic language switching without app restarts Create a testable localization architecture Handle platform-specific locale implementations The Settings Screen demonstrates our new approach to localization, enabling dynamic language switching without app restarts on both Android and iOS.Welcome back! In this article, we’ll explore my approach to implementing Internationalization (I18n) in a Kotlin Multiplatform project. I’ll share how I’ve structured the solution to enable resource sharing between Android and iOS platforms. While this implementation might be more complex than necessary for some use cases, it demonstrates a modular approach to handling internationalization. Let’s dive in and see how it works.
Internationalization (I18n) Internationalization (I18n) is the process of designing and developing applications that can be adapted to different languages and regions.Intro SQLDelight is a powerful tool for managing database schemas in Kotlin Multiplatform projects. In this blog post, I’ll walk through how I setup SQLDelight migrations for TvManiac.
SQLDelight Migrations SQLDelight migrations allow you to evolve your database schema over time while preserving existing data. Migration files in SQLDelight follow a simple naming convention: <version>.sqm. These files are stored in the same directory as your .sq files, typically under your sqldelight source directory.Intro If you’ve used Anvil before, you know it takes away a lot of the boilerplate code and makes DI seamless. If Anvil is new to you, it basically allows you to contribute dagger modules and component interfaces to your DI graph, merge all the contributions, and add them to your component during compilation. Ralf Wonderatschek and Gabriel Peal gave an in-depth talk about this. Dagger + Anvil: Learning to Love Dependency Injection.Intro Howdy folks! In my previous article, I discussed how modularizing the iOS codebase using Swift packages improved development efficiency and code organization. In this article, we’ll explore how to create a new package for the shared code and automate XCFramework generation using a custom Gradle plugin.
Background After moving most of the reused UI-related code to Swift packages, I realized I could create a specific package for the shared code that can be used in the iOS app.Intro Remember our adventure in Going Modular — The Kotlin Multiplatform Way? Well, this is a continuation of that. (Sort of 😁). I say sort of because this article focuses on the Swift side of things. We will explore how creating UI components in a separate Swift package can significantly improve the development experience when working on the iOS App.
If you are interested in the code, here is the Pull Request.Using Roborazzi for Android Screenshot Testing Screenshot testing is a powerful tool for catching unintended UI changes in your Android app. Roborazzi is a modern screenshot testing library that makes it easy to implement and maintain these tests. It leverages Robolectric to provide fast, reliable tests that can run on your development machine without the need for emulators or physical devices. Key benefits of Roborazzi include:
Easy integration with existing Android projects Fast execution times Support for multiple device configurations and themes Compatibility with Jetpack Compose In this post, we’ll walk through setting up Roborazzi and creating some basic screenshot tests.Disclaimer: This blog post does not aim to compare various navigation libraries; instead, it offers insights into my personal journey of arriving at a navigation solution. The intention is not to provide a comparative analysis of different libraries but to share my decision-making process.
Intro: Now, let’s delve into the journey. My initial focus was on streamlining Compose Screens and refining the presentation layer. I wanted to relocate the navigation logic from the screens to the presentation layer.Introduction: Handling various HTTP response codes is crucial when building mobile applications that communicate with APIs. This article will explore how to use Ktor’s HttpResponseValidator to intercept and handle responses in mobile applications.
We’ll use Trakt as a use case since it’s what I am for my project, but the concept should work for any API. One of the status codes from Trakt is 403 (Forbidden), which indicates that the server understands the request but refuses to authorize it.In this article, I will talk about my experience working with environment variables on Kmm (Kotlin Multiplatform) and how I am currently using it in my project Tv-Maniac.
Environment Variables During the development lifecycle of a mobile app, you probably may be create apps that use API keys or passwords. It is best practise to store such sensitive info in a secure place. In Android, you’d ideally use local.properties or gradle.