
Enables easy retrieval of the local IP address of connected devices on Android and iOS. Lightweight, straightforward to use, enhancing cross-platform network utility.
Lokal-IP KMP is a Kotlin Multiplatform library that allows you to easily retrieve the local IP address of the connected device on both Android and iOS.
✔ Retrieve the local IP address of the device
✔ Supports Android and iOS using Kotlin Multiplatform
✔ Lightweight and easy to use
Add the following dependency to your Kotlin Multiplatform project:
commonMain.dependencies {
implementation("io.github.mohaberabi:lokal-ip:0.0.2")
}import com.mohaberabi.lokalip.LokalIp
fun getLocalIp(): String {
val lokalIp = LokalIpFactory().create()
val localIpAddress = lokalIp.getLocalIpAddress()
return localIpAddress
}Lokal-IP KMP is a Kotlin Multiplatform library that allows you to easily retrieve the local IP address of the connected device on both Android and iOS.
✔ Retrieve the local IP address of the device
✔ Supports Android and iOS using Kotlin Multiplatform
✔ Lightweight and easy to use
Add the following dependency to your Kotlin Multiplatform project:
commonMain.dependencies {
implementation("io.github.mohaberabi:lokal-ip:0.0.2")
}import com.mohaberabi.lokalip.LokalIp
fun getLocalIp(): String {
val lokalIp = LokalIpFactory().create()
val localIpAddress = lokalIp.getLocalIpAddress()
return localIpAddress
}