Rinku
Rinku is a lightweight Kotlin Multiplatform library designed to simplify deep link handling across iOS and Android platforms. By abstracting platform-specific details, Rinku enables developers to manage deep links in a unified manner, enhancing code reuse and maintaining consistency across platforms.
Core Features
- Unified Deep Link Management: Architect your deep link logic once, and execute seamlessly across iOS and Android platforms.
- Simplified Integration: Designed for rapid setup with minimal configuration requirements, ensuring a smooth start.
- Universal Compatibility with Navigation Libraries: Rinku's architecture is designed for compatibility with any navigation library (Voyager, Decompose, custom solutions, etc.). It delegates the parsing and navigation logic to the application, permitting seamless integration and enhanced flexibility.
Prerequisites
- Kotlin Multiplatform project setup
- For Android: Minimum SDK version 23
- For iOS: iOS 13.0 or later
The library is available via Maven Central
implementation("dev.theolm:rinku:<latest_version>")
implementation("dev.theolm:rinku-compose-ext:<latest_version>")
For iOS, Swift export, filters, mappers, and other platforms, see the full documentation.
Quick Start
1. Initialize on Android
Inside MainActivity.onCreate, call RinkuInit():
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
RinkuInit()
setContent { App() }
}
}
If you use Compose Multiplatform, wrap your root instead:
setContent {
Rinku { App() }
}
2. Listen and navigate in common code
@Composable
fun RootApp() {
var deepLink by remember { mutableStateOf<DeepLink?>(null) }
DeepLinkListener { deepLink = it }
MainScreen(deepLink)
}
3. Trigger a deep link
Rinku.handleDeepLink("https://example.com/second/third?user={\"name\":\"Theo\"}")
// Access parsed components
deepLink?.host
deepLink?.pathSegments // ["second", "third"]
deepLink?.parameters // { "user" = "{\"name\":\"Theo\"}" }
For type-safe arguments, custom URL schemes, filters, and iOS setup, see the full documentation.
Samples
The samples/ directory contains runnable examples demonstrating integration with popular navigation libraries:
samples/common— Shared UI components and screen definitions used by both samplessamples/voyager— Voyager integration (shared module, Android app, iOS app)samples/decompose— Decompose integration (shared module, Android app)
Documentation
You can find the full documentation here
License
Rinku is released under the MIT License. See the LICENSE file for more details.
