Skip to content

Commit

Permalink
Merge branch 'master' into #61-export-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex009 committed May 4, 2020
2 parents 2b69dd1 + 1fc79aa commit 8b27c82
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This is a Kotlin MultiPlatform library that provides access to the resources on
- [Versions](#versions)
- [Installation](#installation)
- [Usage](#usage)
- [FAQ](#faq)
- [Samples](#samples)
- [Set Up Locally](#setup-locally)
- [Contributing](#contributing)
Expand Down Expand Up @@ -281,6 +282,31 @@ We got autogenerated `MR.fonts.Raleway.italic`, `MR.fonts.Raleway.regular`, `MR.
- Android: `textView.typeface = font.getTypeface(context = this)`
- iOS: `textView.font = font.uiFont(withSize: 14.0)`

## FAQ
If on iOS you see just localization keys - add to iOS framework exports `moko-resources`.
[Gradle - exports](https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#exporting-dependencies-to-binaries)
sample with [mobile-multiplatform-plugin](https://github.com/icerockdev/mobile-multiplatform-gradle-plugin):
```
setupFramework(
exports = listOf(Deps.Libs.MultiPlatform.mokoResources)
)
```
sample without our plugin:
```
kotlin {
iosX64().binaries {
framework {
export("dev.icerock.moko:resources-iosx64:0.9.0")
}
}
iosArm64().binaries {
framework {
export("dev.icerock.moko:resources-iosarm64:0.9.0")
}
}
}
```

## Samples
Please see more examples in the [sample directory](sample).

Expand Down

0 comments on commit 8b27c82

Please sign in to comment.