File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed
images/multiplatform/ios-integration Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -669,12 +669,29 @@ which you can access from Xcode.
669
669
#### How to enable Swift export
670
670
671
671
Keep in mind that the feature is currently only in the early stages of development.
672
- To try it out in your project, add the following Gradle option to your ` gradle.properties ` file:
673
672
674
- ``` none
675
- # gradle.properties
676
- kotlin.experimental.swift-export.enabled=true
677
- ```
673
+ Swift export currently works in projects that use
674
+ [ direct integration] ( multiplatform-direct-integration.md ) to connect the iOS framework to the Xcode project.
675
+ This is a standard configuration for Kotlin Multiplatform projects created in Android Studio or through the [ web wizard] ( https://kmp.jetbrains.com/ ) .
676
+
677
+ To try out Swift export in your project:
678
+
679
+ 1 . Add the following Gradle option to your ` gradle.properties ` file:
680
+
681
+ ``` none
682
+ # gradle.properties
683
+ kotlin.experimental.swift-export.enabled=true
684
+ ```
685
+
686
+ 2 . In Xcode, open the project settings.
687
+ 3 . On the ** Build Phases** tab, locate the ** Run Script** phase with the ` embedAndSignAppleFrameworkForXcode ` task.
688
+ 4 . Adjust the script to feature the ` embedSwiftExportForXcode ` task instead in the run script phase:
689
+
690
+ ``` bash
691
+ ./gradlew :< Shared module name> :embedSwiftExportForXcode
692
+ ```
693
+
694
+ ![ Add the Swift export script] ( xcode-swift-export-run-script-phase.png ) {width=700}
678
695
679
696
#### Leave feedback on Swift export
680
697
You can’t perform that action at this time.
0 commit comments