I'm trying to add a dependency on a CocoaPod with ...
# kotlin-native
j
I'm trying to add a dependency on a CocoaPod with custom cinterop options, as described here. I want cinterop to pass "-fmodules" and "-fcxx-modules" to the compiler, and so I'm using the following bit inside the cocoapods block of my build.gradle.kts file:
Copy code
pod("MatrixSDK"){
            extraOpts = listOf("-compiler-options = -fmodules -fcxx-modules")
}
But I continue to get an error that says:
Copy code
Exception in thread "main" java.lang.IllegalStateException: Unknown option -compiler-options = -fmodules -fcxx-modules
I'm clearly just using the command wrong, but I can't find any documentation for proper use anywhere. Can someone help me out with this?
v
I’m afraid -fmodules flag is not supported https://youtrack.jetbrains.com/issue/KT-39120
j
Thats unfortunate. So, as was suggested in the comments of that post, it seems like my only option to fork the Pod's git repo and replace all the uses of
@import
with
#import
, is this correct? Are there plans to support the "-fmodules" flag in the future?
v
Correct, for swift pods it may be also required to
#import
all `@import`s from generated objc header to the pod umbrella framework. As for the -fmodules support, it definitely will be added in future but unfortunately I don’t have any specific dates for it