Creating a simple Kotlin Multiplatform project based on moko-template

1. Intro

Tools

  • Android Studio 3.4.0+ (do not use 3.5.1 version, cause there is a bug is breaking MPP project);
  • Xcode 10.3+;
  • Xcode Command Line Tools (xcode-select --install);
  • CocoaPods (sudo gem install cocoapods);
  • JDK — требуется для запуска gradle из Xcode build phase.

The Result

2. Create the project based on moko-template

Use this template

3. Test build

  • on Android: open root repository directory in Android Studio, wait while Gradle Sync will finish, and run android-app as regular application.
  • on iOS: install project’s CocoaPods (in directory ios-app run a command pod install, and after this open ios-app/ios-app.xcworkspace in Xcode and press Run for running application.

4. Setting up an application identifiers

Change Appliсation Id

android {
...

defaultConfig {
...

applicationId = "dev.icerock.codelab.giphy"
...
}
}

Change an application name

<resources>
<string name="app_name">Giphy App</string>
...
</resources>

Change an application icon

<manifest>
<application
...
android:icon="@mipmap/ic_launcher">
...
</application>
</manifest>

Change launch screen

5. Next steps

--

--

A boundlessly imaginative mobile development team from the depths of Siberia and its capital, the city of Novosibirsk. Let’s meet on www.icerockdev.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store