Posts tagged braziliandevs
-
KMP-102 - Modularization in KMP
In the last article we dug into the quirks of code exported to Objective-C headers, along with the best practices for what to export…
-
KMP-102 - Optimizing Kotlin for Obj-C/Swift
In the last post, we learned how to use Kotlin code in Swift, some techniques to improve the code exported to Swift, and how annotations control its…
-
KMP-102 - Using Kotlin Code in Swift
In the last post, we learned how to create an XCFramework from Kotlin code and explored some characteristics of the generated build types.
-
KMP-102 - Characteristics of the XCFramework in KMP
In the previous post, we learned how Kotlin/Native exports a collection of .frameworks in the XCFramework format.
-
KMP-102 - XCFramework for KMP Devs
Welcome to the KMP-102 series. We dig deeper into Kotlin Multiplatform concepts, learning more about how to integrate our Kotlin code into iOS and beyond.
-
Kotlin Koans BR: Import alias
When importing a class or function, you can give it a different name by adding as NewName after the import directive. This can be useful when…
-
Kotlin Koans BR: Extension functions and properties
Implement the extension functions Int.r() and Pair.r() so they convert an Int and a Pair into a RationalNumber.
-
Kotlin Koans BR: Named arguments
Make the joinOptions() function return the list in JSON format (for example, [a, b, c]) by specifying only two arguments.
-
Kotlin Koans BR: Default arguments
Imagine you have several overloads of foo() in your favorite language. You can replace them all with a single function in Kotlin.
-
Kotlin Koans BR: Data Classes
Rewrite the following code in Kotlin, then add the data modifier. A beginner-friendly look at Kotlin classes and data classes.
-
Kotlin Koans BR: Sealed Classes
Reuse your solution from the previous task, but replace the interface with a sealed interface. That way you no longer need the else branch in the when expression.
-
Kotlin Koans BR: Lambdas
Pass a lambda to the any function to check whether the collection contains an even number.
-
Kotlin Koans BR: String Templates
The pattern below matches a date in the format 13.06.1992 (two digits, a dot, two digits, a dot, four digits):
-
Kotlin Koans BR: Hello, world!
Change the code so that the start function returns the string "OK".
-
Kotlin Koans BR: Triple-quoted strings
Swap the trimIndent call for trimMargin, setting # as the prefix value, so the resulting string no longer contains the prefix character.
-
Kotlin Koans BR: Smart casts
Rewrite the given code using Kotlin smart casts and the when expression.
-
Kotlin Koans BR: The "nothing" type (Nothing)
Specify the Nothing return type for the failWithWrongAge function.
-
Kotlin Koans BR: Nullable types
Rewrite the following code so that it uses only a single if expression, and learn how Kotlin handles nullable types safely.
-
KMP 101: Exploring internal and external dependencies in KMP (end of the series)
In previous articles, we established a foundation in Kotlin Multiplatform (KMP) and how it compiles to multiple platforms.
-
KMP 101: How to Share Code in KMP - Connecting Platforms with expect and actual
Unpacking the expect and actual keywords in Kotlin Multiplatform and the different ways they let you share code across platforms.
-
KMP 101: Learning how Gradle is used in Kotlin Multiplatform
In the last article, we created a project using the KMP Wizard and, with little effort, ran our app on Android, iOS, and Desktop.
-
KMP 101: Creating and running your first multiplatform project in Fleet
Over the last few articles we covered key KMP concepts, from the multiplatform paradigm to setting up the environment.
-
KMP 101: Understanding and Setting Up the Dev Environment in Kotlin Multiplatform
Software development is a complex process that demands not only skill and creativity, but also a well-configured development environment.
-
KMP 101: Mastering the Principles of Source Sets
In the last article, we learned about the Kotlin compiler frontend, IR, and backend. Now we dig into source sets — the key concept for writing KMP code.
-
KMP 101: Understanding How Kotlin Compiles to Multiple Platforms
In the last post (🔗 KMP 101: An Introduction to the multiplatform paradigm), we explored the multiplatform paradigm and how KMP stands out in the ecosystem.
-
KMP 101: An introduction to the multiplatform paradigm
We use a wide range of apps every day on phones, watches, TVs, and computers, all part of a broad digital ecosystem.