Skip to content

Commit

Permalink
Add ios export instructions to ios
Browse files Browse the repository at this point in the history
  • Loading branch information
xxfast committed Feb 7, 2024
1 parent c055564 commit 85b3d9c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/topics/platform-configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,28 @@ fun HomeUIViewController(routerContext: RouterContext): UIViewController =
You will need to tie root `RouterContext`'s lifecycle to an `AppDelegate`.

> Important!
> To invoke decompose router's `defaultRouterContext()` from swift, you will need to export decompose-router from your shared module
> To invoke decompose router's `defaultRouterContext()` from swift, you will need to export decompose-router from your shared module.
>
> Refer to the sample [here](https://github.com/xxfast/Decompose-Router/blob/main/app/build.gradle.kts)
> ```kotlin
> kotlin {
> ios {
> binaries{
framework {
> export(libs.decompose.router)
> }
> }
> }
>
> sourceSets {
> val commonMain by getting {
> dependencies {
> // Only need to add this as api if you wish to add your own AppDelegate in swift
> api(libs.decompose.router)
> }
> }
> }
> ```
{style=warning}
If you are using SwiftUI
Expand Down

0 comments on commit 85b3d9c

Please sign in to comment.