You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/topics/multiplatform/native-cocoapods-xcode.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,12 @@ dependency by calling `pod install` manually for each Xcode project. In other ca
59
59
end
60
60
```
61
61
62
-
6. Run**ReloadAllGradleProjects**inIntelliJIDEA (or**SyncProject with GradleFiles**inAndroidStudio)
62
+
6. Run `pod install` in you project directory.
63
+
64
+
When you run `pod install` for the first time, it creates the `.xcworkspace` file. This file
65
+
includes your original `.xcodeproj` and the CocoaPods project.
66
+
7. Close your `.xcodeproj` andopen the new `.xcworkspace` file instead. This way you avoid issues with project dependencies.
67
+
8. Run**ReloadAllGradleProjects**inIntelliJIDEA (or**SyncProject with GradleFiles**inAndroidStudio)
63
68
to re-import the project.
64
69
65
70
## Xcode project with several targets
@@ -109,12 +114,17 @@ dependency by calling `pod install` manually for each Xcode project. In other ca
109
114
end
110
115
```
111
116
112
-
6. Run **Reload All Gradle Projects** in IntelliJ IDEA (or **Sync Project with Gradle Files** in Android Studio)
117
+
6. Run `pod install` in you project directory.
118
+
119
+
When you run `pod install` for the first time, it creates the `.xcworkspace` file. This file
120
+
includes your original `.xcodeproj` and the CocoaPods project.
121
+
7. Close your `.xcodeproj` and open the new `.xcworkspace` file instead. This way you avoid issues with project dependencies.
122
+
8. Run **Reload All Gradle Projects** in IntelliJ IDEA (or **Sync Project with Gradle Files** in Android Studio)
113
123
to re-import the project.
114
124
115
125
You can find a sample project [here](https://github.com/Kotlin/kmm-with-cocoapods-multitarget-xcode-sample).
116
126
117
127
## What's next
118
128
119
129
See [Connect the framework to your iOS project](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-integrate-in-existing-app.html#connect-the-framework-to-your-ios-project)
120
-
to learn how to add a custom build script to build phases inXcode projects.
130
+
to learn how to add a custom build script to build phases inXcode projects.
Copy file name to clipboardExpand all lines: docs/topics/multiplatform/native-cocoapods.md
+29-24Lines changed: 29 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,40 +216,45 @@ the build process of an Xcode project.
216
216
217
217
## Update Podfile for Xcode
218
218
219
-
If you want to import your Kotlin project in an Xcode project, you need to make some changes to your Podfile:
219
+
If you want to import your Kotlin project to an Xcode project:
220
220
221
-
* If your project has any Git, HTTP, or custom Podspec repository dependencies, you should also specify the path to
222
-
the Podspec in the Podfile.
221
+
1. Make changes in your Podfile:
223
222
224
-
For example, if you add a dependency on `podspecWithFilesExample`, declare the path to the Podspec in the Podfile:
223
+
* If your project has any Git, HTTP, or custom Podspec repository dependencies, you should specify the path to
224
+
the Podspec in the Podfile.
225
225
226
-
```ruby
227
-
target 'ios-app'do
226
+
For example, if you add a dependency on `podspecWithFilesExample`, declare the path to the Podspec in the Podfile:
227
+
228
+
```ruby
229
+
target 'ios-app'do
228
230
# ... other dependencies ...
229
-
pod 'podspecWithFilesExample', :path =>'cocoapods/externalSources/url/podspecWithFilesExample'
230
-
end
231
-
```
231
+
pod 'podspecWithFilesExample', :path =>'cocoapods/externalSources/url/podspecWithFilesExample'
232
+
end
233
+
```
232
234
233
-
The `:path` should contain the filepath to the Pod.
235
+
The `:path` should contain the filepath to the Pod.
234
236
235
-
* When you add a library from the custom Podspec repository, you should also specify the [location](https://guides.cocoapods.org/syntax/podfile.html#source)
236
-
of specs at the beginning of your Podfile:
237
+
* When you add a library from the custom Podspec repository, you should also specify the [location](https://guides.cocoapods.org/syntax/podfile.html#source)
0 commit comments