@@ -43,9 +43,9 @@ version of the library, you can just omit this parameter altogether.
43
43
summary = " CocoaPods test library"
44
44
homepage = " https://github.com/JetBrains/kotlin"
45
45
46
- pod(" FirebaseAuth " ) {
47
- version = " 10.16 .0"
48
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
46
+ pod(" SDWebImage " ) {
47
+ version = " 5.20 .0"
48
+ extraOpts + = listOf (" -compiler-option" )
49
49
}
50
50
}
51
51
}
@@ -57,7 +57,7 @@ version of the library, you can just omit this parameter altogether.
57
57
To use these dependencies from the Kotlin code, import the packages `cocoapods.< library- name> `:
58
58
59
59
```kotlin
60
- import cocoapods.FirebaseAuth .*
60
+ import cocoapods.SDWebImage .*
61
61
```
62
62
63
63
## On a locally stored library
@@ -87,17 +87,17 @@ import cocoapods.FirebaseAuth.*
87
87
88
88
pod(" pod_dependency" ) {
89
89
version = " 1.0"
90
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
90
+ extraOpts + = listOf (" -compiler-option" )
91
91
source = path(project.file(" ../pod_dependency" ))
92
92
}
93
93
pod(" subspec_dependency/Core" ) {
94
94
version = " 1.0"
95
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
95
+ extraOpts + = listOf (" -compiler-option" )
96
96
source = path(project.file(" ../subspec_dependency" ))
97
97
}
98
- pod(" FirebaseAuth " ) {
99
- version = " 10.16 .0"
100
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
98
+ pod(" SDWebImage " ) {
99
+ version = " 5.20 .0"
100
+ extraOpts + = listOf (" -compiler-option" )
101
101
}
102
102
}
103
103
}
@@ -116,7 +116,7 @@ To use these dependencies from the Kotlin code, import the packages `cocoapods.<
116
116
```kotlin
117
117
import cocoapods.pod_dependency.*
118
118
import cocoapods.subspec_dependency.*
119
- import cocoapods.FirebaseAuth .*
119
+ import cocoapods.SDWebImage .*
120
120
```
121
121
122
122
## From a custom Git repository
@@ -150,25 +150,25 @@ import cocoapods.FirebaseAuth.*
150
150
151
151
ios.deploymentTarget = " 16.0"
152
152
153
- pod(" FirebaseAuth " ) {
154
- source = git(" https://github.com/firebase/firebase-ios-sdk " ) {
155
- tag = " 10.16 .0"
153
+ pod(" SDWebImage " ) {
154
+ source = git(" https://github.com/SDWebImage/SDWebImage " ) {
155
+ tag = " 5.20 .0"
156
156
}
157
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
157
+ extraOpts + = listOf (" -compiler-option" )
158
158
}
159
159
160
160
pod(" JSONModel" ) {
161
161
source = git(" https://github.com/jsonmodel/jsonmodel.git" ) {
162
162
branch = " key-mapper-class"
163
163
}
164
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
164
+ extraOpts + = listOf (" -compiler-option" )
165
165
}
166
166
167
167
pod(" CocoaLumberjack" ) {
168
168
source = git(" https://github.com/CocoaLumberjack/CocoaLumberjack.git" ) {
169
169
commit = " 3e7f595e3a459c39b917aacf9856cd2a48c4dbf3"
170
170
}
171
- extraOpts + = listOf (" -compiler-option" , " -fmodules " )
171
+ extraOpts + = listOf (" -compiler-option" )
172
172
}
173
173
}
174
174
}
@@ -230,13 +230,17 @@ import cocoapods.example.*
230
230
## With custom cinterop options
231
231
232
232
1 . Specify the name of a Pod library in the ` pod() ` function.
233
+ 2 . In the configuration block, add the following options:
233
234
234
- In the configuration block, specify the cinterop options:
235
- * ` extraOpts ` – to specify the list of options for a Pod library. For example, specific flags: ` extraOpts = listOf("-compiler-option") ` .
236
- * ` packageName ` – to specify the package name. If you specify this, you can import the library using the package name:
237
- ` import <packageName> ` .
235
+ * ` extraOpts ` – to specify the list of options for a Pod library. For example, ` extraOpts = listOf("-compiler-option") ` .
236
+
237
+ > If you encounter issues with clang modules, add the ` -fmodules ` option as well.
238
+ >
239
+ {style="note"}
238
240
239
- 2 . Specify the minimum deployment target version for the Pod library.
241
+ * ` packageName ` – to import the library directly using the package name with ` import <packageName> ` .
242
+
243
+ 3 . Specify the minimum deployment target version for the Pod library.
240
244
241
245
``` kotlin
242
246
kotlin {
@@ -249,28 +253,29 @@ import cocoapods.example.*
249
253
250
254
ios.deploymentTarget = " 16.0"
251
255
252
- pod(" YandexMapKit" ) {
253
- packageName = " YandexMK"
256
+ pod(" FirebaseAuth" ) {
257
+ packageName = " FirebaseAuthWrapper"
258
+ version = " 11.7.0"
254
259
extraOpts + = listOf (" -compiler-option" , " -fmodules" )
255
260
}
256
261
}
257
262
}
258
263
```
259
264
260
- 3 . Run ** Reload All Gradle Projects ** in IntelliJ IDEA (or ** Sync Project with Gradle Files ** in Android Studio )
265
+ 4 . Run ** Reload All Gradle Projects ** in IntelliJ IDEA (or ** Sync Project with Gradle Files ** in Android Studio )
261
266
to re- import the project.
262
267
263
268
To use these dependencies from the Kotlin code, import the packages `cocoapods.< library- name> `:
264
269
265
270
```kotlin
266
- import cocoapods.YandexMapKit .*
271
+ import cocoapods.FirebaseAuth .*
267
272
```
268
273
269
274
If you use the ` packageName ` parameter, you can import the library using the package name ` import <packageName> ` :
270
275
271
276
``` kotlin
272
- import YandexMK.YMKPoint
273
- import YandexMK.YMKDistance
277
+ import FirebaseAuthWrapper.Auth
278
+ import FirebaseAuthWrapper.User
274
279
```
275
280
276
281
### Support for Objective-C headers with @import directives
@@ -298,6 +303,7 @@ kotlin {
298
303
ios.deploymentTarget = " 16.0"
299
304
300
305
pod(" PodName" ) {
306
+ version = " 1.0.0"
301
307
extraOpts = listOf (" -compiler-option" , " -fmodules" )
302
308
}
303
309
}
0 commit comments