SweetMeSoft Kotlin Multiplatform Library
Welcome to the official documentation! SweetMeSoft KMP Library is designed to accelerate cross-platform mobile development by sharing codebases between Android and iOS using Compose Multiplatform while maintaining a native look, feel, and performance.
Library Architecture
The library is split into three core modules:
KMPBase
Core architecture foundation including base ViewModel and Screen setups, loading overlays, network clients, dialog utilities, and platforms helpers.
Explore KMPBaseKMPControls
Premium UI pickers (Date, Time, DateTime), password fields, autocomplete widgets, terms and conditions screens, and customizable OTP/PIN inputs.
Explore KMPControlsKMPMaps
Unified mapping component wrapping Google Maps (Android) and MapKit (iOS) supporting markers, path routing, geometric overlays, and GPS location tracking.
Explore KMPMapsQuick Start in 3 Steps
1. Add Dependencies
Add the version and libraries in your gradle/libs.versions.toml file:
[versions]
sweetmesoft = "2.2.1"
[libraries]
sweetmesoft-kmpbase = { module = "com.sweetmesoft.kmpbase:kmpbase", version.ref = "sweetmesoft" }
sweetmesoft-kmpcontrols = { module = "com.sweetmesoft.kmpcontrols:kmpcontrols", version.ref = "sweetmesoft" }
sweetmesoft-kmpmaps = { module = "com.sweetmesoft.kmpmaps:kmpmaps", version.ref = "sweetmesoft" }
In your shared module’s build.gradle.kts (under commonMain dependencies):
implementation(libs.sweetmesoft.kmpbase)
implementation(libs.sweetmesoft.kmpcontrols)
implementation(libs.sweetmesoft.kmpmaps)
2. Initialize in MainActivity (Android)
import android.os.Bundle
import androidx.activity.ComponentActivity
import com.sweetmesoft.kmpbase.BaseAndroid.Companion.initSweetMeSoft
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Initialize KMP library core platform context
initSweetMeSoft(this)
setContent {
App()
}
}
}
3. Connect Voyager Navigation
import androidx.compose.runtime.Composable
import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.transitions.SlideTransition
import com.sweetmesoft.kmpbase.base.BaseViewModel
@Composable
fun App() {
Navigator(screen = MainScreen()) { navigator ->
// Cache the navigator globally to support ViewModel routing
BaseViewModel.navigator = navigator
SlideTransition(navigator)
}
}
Core Features
- True Multiplatform: Unified UI and logic compiles natively for Android (Jetpack Compose) and iOS (UIKit / Compose).
- Modern M3 Design: High-fidelity, accessibile Material Design 3 styling supporting light/dark theme switching out-of-the-box.
- Robust Networking: Seamless Http Client wrappers integrated directly with loading overlays.
- Biometric Integration: Unified fingerprint/FaceID status check and prompt verification API.
Try KMPTestApp Example
Experience the unified KMP UI controls, biometrics, and native maps directly on your Android or iOS device:
Need Help?
- Read the Getting Started Guide to configure your first application.
- Explore KMPTestApp Guide to see real-world implementation samples.
- Visit our GitHub Repository to report bugs or request features.