Skip to content

Commit

Permalink
Merge pull request #141 from icerockdev/#135-cocoapods-plugin-docs
Browse files Browse the repository at this point in the history
#135 add static framework with Pods dependencies configuration guide
  • Loading branch information
Alex009 committed Dec 29, 2020
2 parents 10a414d + ce4cf6c commit b1e1c6b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,28 @@ multiplatformResources {
}
```

#### With Pods dependencies in Kotlin
When you use `org.jetbrains.kotlin.native.cocoapods` plugin and also kotlin module depends to Pods -
you also need to pass extra properties:
```shell script
"$SRCROOT/../gradlew" -p "$SRCROOT/../" :shared:copyFrameworkResourcesToApp \
-Pmoko.resources.PLATFORM_NAME=$PLATFORM_NAME \
-Pmoko.resources.CONFIGURATION=$CONFIGURATION \
-Pmoko.resources.BUILT_PRODUCTS_DIR=$BUILT_PRODUCTS_DIR \
-Pmoko.resources.CONTENTS_FOLDER_PATH=$CONTENTS_FOLDER_PATH\
-Pkotlin.native.cocoapods.target=$KOTLIN_TARGET \
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION \
-Pkotlin.native.cocoapods.cflags="$OTHER_CFLAGS" \
-Pkotlin.native.cocoapods.paths.headers="$HEADER_SEARCH_PATHS" \
-Pkotlin.native.cocoapods.paths.frameworks="$FRAMEWORK_SEARCH_PATHS"
```
and setup extra build settings in your xcode target:
```
'KOTLIN_TARGET[sdk=iphonesimulator*]' => 'ios_x64'
'KOTLIN_TARGET[sdk=iphoneos*]' => 'ios_arm64'
```
[here example of changes](https://github.com/ln-12/moko-resources-issue-99/pull/2/files)

## Usage
### Example 1 - simple localization string
The first step is a create a file `strings.xml` in `commonMain/resources/MR/base` with the following content:
Expand Down

0 comments on commit b1e1c6b

Please sign in to comment.