Code Monkey home page Code Monkey logo

kotlin-multiplatform-sample's Introduction

KMM First Look

What is Kotlin Multiplatform (KMP)

  • Kotlin Multiplatform allows you to share your business logic on multiple platforms like android, iOS and native desktop applications and as a result reducing the amount of time required for development.

Now what is Kotlin Multiplatform Mobile (KMM) ?

  • Kotlin Multiplatform (KMP) and Kotlin Multiplatform Mobile (KMM) are not seperate technologies. You can think of Kotlin Multiplatform Mobile (KMM) as a subset of Kotlin Multiplatform (KMP) which primarily focuses on mobile features. Kotlin Multiplatform Mobile (KMM) uses the multiplatform capabilities of kotlin to share bussiness logic of iOS and Android apps.

Why Kotlin Multiplatform Mobile (KMM) ?

  • Using KMM we can write our business logic once and reuse that for both the platforms android and iOS. We only need to write our platform specific code wherever it's necessary for example to implement our native UI. Does that mean we can have a single application which can run on both Android and iOS app using KMM ? No KMM is specifically design to share only business logic and use native UI to have exact look and feel as simple Android or iOS app. So we still need to create seperate applications for both the platforms.

About this project.

This is a sample KMM project which tries to shares as much as code possible between Android and iOS.

Android App iOS App

Pre-requisites

  • Android Studio – version 4.2 or higher.
  • Xcode – version 11.3 or higher.
  • This app displays a list of movies using API from TMDB so you must have a valid api key from TMDB. (If you don't have one you can get it here :- https://www.themoviedb.org/documentation/api)

How to Run Android App :-

  • Open Android Studio
  • Add KMM Plugin from Android Studio -> Preferences -> Plugins -> MarketPlace -> Search for Kotlin Multiplatform Mobile -> Install and Restart Android Studio

  • Run app.

How to Run iOS App :-

  • Pretty Simple KMM allows you to run and debug your iOS App from Android Studio itself. Just switch from androidApp to iosApp in your run configurations menu. (Remember :- This app contains Pods so we need to install that from Terminal first before running iOS app from Android Studio or xCode)
  • If you are an Android Developer who wants to explore iOS App or a newbie in iOS development and got confused about how to work with pods, we got you covered! You can find everything about pods here : :- https://cocoapods.org/
  • Does that mean you can simply run iOS App without xCode or macOS machine ? No You still need a macOS , xCode (and Simulators) and command line tools installed on your machine to run your iOS App.
  • Also you can run this project with xCode.
  • Open iosApp folder from the project install pods with terminal open .xcworkspace and run your application.

Find this example useful? ❤️

Support it by joining stargazers for this repository. ⭐

🤝 How to Contribute

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! 💪

Check out our Contributing Guide for ideas on contributing.

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details

kotlin-multiplatform-sample's People

Contributors

mdhanif-simformsolutions avatar mobile-simformsolutions avatar poojagupta-simformsolutions avatar shwetachauhan-simform avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.