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.In this article, well, take a look at how to DataStore and how to use it in a Kotlin Multiplatform project.
Recently Google announced a couple of Jetpack Multiplatform libraries. One is DataStore, a storage solution that allows you to store key-value pairs. This has been rewritten & is now available on Kotlin Multiplatform, targeting Android & iOS. Something to take note of is that these libraries are experimental and should not be used on production appsI recently decided to dive into the Kotlin Multiplatform world. So far, so good. This article talks about my journey modularising a project I’ve been working on.
There are other ways of going about this, but this worked for me.
TvManiac I’m using TMDB to fetch Tv Show information. Here’s how it looks on both platforms. I have much work done on Android since that’s my territory. I’m updating the iOS side of things as I learn.