Skip to content

Commit 0cef717

Browse files
authored
Describe migration from remote SPM integration in local SPM doc (JetBrains#162)
* Describe migration from remote SPM integration in local SPM doc. Rebuild special 1.9 version to support Compose
1 parent 7a3931b commit 0cef717

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

topics/development/multiplatform-spm-local-integration.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ in your Xcode project.
1313

1414
The feature is available starting with Kotlin 2.0.0.
1515

16-
If you still haven't upgraded to Kotlin 2.0.0, you can use a special Kotlin version, `1.9.24-spm` from the
16+
If you still haven't upgraded to Kotlin 2.0.0, you can use a special Kotlin version, `1.9.24-spm2` from the
1717
`https://packages.jetbrains.team/maven/p/mpp/dev` Maven repository. You can add the repository, for instance,
1818
in your `settings.gradle.kts`:
1919

@@ -34,8 +34,18 @@ dependencyResolutionManagement {
3434
```
3535

3636
The tutorial assumes that your project is using [direct integration](multiplatform-project-configuration.md#connect-a-kotlin-multiplatform-module-to-an-ios-app)
37-
approach with the `embedAndSignAppleFrameworkForXcode` task. If you're connecting a Kotlin framework through CocoaPods
38-
plugin, migrate first.
37+
approach with the `embedAndSignAppleFrameworkForXcode` task in the project's build phase. If you're connecting a Kotlin framework through CocoaPods
38+
plugin or through Swift package with `binaryTarget`, migrate first.
39+
40+
### Migrate from SPM binaryTarget integration to local direct integration {initial-collapse-state="collapsed"}
41+
42+
To migrate from the SPM integration with `binaryTarget`:
43+
44+
1. In Xcode, clean build directories using **Product** | **Clean Build Folder** or with the
45+
<shortcut>Cmd + Shift + K</shortcut> shortcut.
46+
2. In every `Package.swift` file, remove both dependencies to the package with a Kotlin framework inside and target
47+
dependencies to the products.
48+
3. To set up direct integration, follow the steps described in [this tutorial](multiplatform-integrate-in-existing-app.md#connect-the-framework-to-your-ios-project).
3949

4050
### Migrate from CocoaPods plugin to direct integration {initial-collapse-state="collapsed"}
4151

@@ -46,15 +56,17 @@ plugin, migrate first.
4656

4757
To migrate from the CocoaPods plugin:
4858

49-
1. In the directory with `Podfile`, run the following command:
59+
1. In Xcode, clean build directories using **Product** | **Clean Build Folder** or with the
60+
<shortcut>Cmd + Shift + K</shortcut> shortcut.
61+
2. In the directory with `Podfile`, run the following command:
5062

5163
```none
5264
pod deintegrate
5365
```
5466

55-
2. Remove the `cocoapods {}` block from your `build.gradle(.kts)` files.
56-
3. Delete the `.podspec` and `Podfile` files.
57-
4. To set up direct integration, follow the steps described in [this tutorial](multiplatform-integrate-in-existing-app.md#connect-the-framework-to-your-ios-project).
67+
3. Remove the `cocoapods {}` block from your `build.gradle(.kts)` files.
68+
4. Delete the `.podspec` and `Podfile` files.
69+
5. To set up direct integration, follow the steps described in [this tutorial](multiplatform-integrate-in-existing-app.md#connect-the-framework-to-your-ios-project).
5870

5971
## Connect the framework to your project
6072

0 commit comments

Comments
 (0)