Setting up the iOS app
The heavy lifting is done for us by the Kotlin Multiplatform Mobile (KMM) plugin we discussed in Chapter 4, Introducing the KMM Learning Project.
If you open the
iosApp.xcodeproj file in the
iosApp module with Xcode and open the Build Phases tab for the
iosApp target, under the Run Script phase, you should be able to see the following command:
This is an integrational task that, as the name suggests, embeds and signs a generated Apple framework from the shared code. This task is visible only from Xcode and can't be used from the command-line interface (CLI). The task is illustrated in the following screenshot and you can read more about it at https://blog.jetbrains.com/kotlin/2021/07/multiplatform-gradle-plugin-improved-for-connecting-kmm-modules/: