GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Kotlin/kmp-logic-sharing-simple-example: A simple project (created by the Kotlin Multiplatform wizard) containing shared business logic between Android, iOS, and Web native UI implementations.

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.run
.run
 
 
androidApp
androidApp
 
 
gradle
gradle
 
 
iosApp
iosApp
 
 
kotlin-js-store
kotlin-js-store
 
 
sharedLogic
sharedLogic
 
 
sharedUI
sharedUI
 
 
webApp
webApp
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
screenshot.png
screenshot.png
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

This is a Kotlin Multiplatform project targeting Android (Jetpack Compose), iOS (SwiftUI), and Web (React).

screenshot.png

  • /iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.

  • /sharedLogic is for the code that will be shared between app targets in the project. The most important subfolder is commonMain. If preferred, you can add code to the platform-specific folders here too.

  • /sharedUI is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:

    • commonMain is for code that’s common for all targets.
    • Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, the iosMain folder would be the right place for such calls. Similarly, if you want to edit the Desktop (JVM) specific part, the jvmMain folder is the appropriate location.
  • /webApp contains web React application. It uses the Kotlin/JS library produced by the sharedLogic module.

Build and Run Android Application

To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:

  • on macOS/Linux
    ./gradlew :androidApp:assembleDebug
  • on Windows
    .\gradlew.bat :androidApp:assembleDebug

Build and Run Web Application

To build and run the development version of the web app, use the run configuration (webApp) from the run widget in your IDE’s toolbar or run it directly from the terminal:

  1. Install Node.js (which includes npm)
  2. Build Kotlin/JS shared code:
  • on macOS/Linux
    ./gradlew :sharedLogic:jsBrowserDevelopmentLibraryDistribution
  • on Windows
    .\gradlew.bat :sharedLogic:jsBrowserDevelopmentLibraryDistribution
  1. Build and run the web application
    npm install
    npm run start

Build and Run iOS Application

To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.


Learn more about Kotlin Multiplatform…

About

A simple project (created by the Kotlin Multiplatform wizard) containing shared business logic between Android, iOS, and Web native UI implementations.

Resources

Readme
Activity
Custom properties

Stars

11 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.