If I would want to add an iOS dependency to my kmm...
# ios
j
If I would want to add an iOS dependency to my kmm module, how does that work? Do I have to expose the kmm module as a cocoapod instead of as a framework, in order to add dependencies? Just adding cocoapods as a plugin in the gradle build file fails to build atm:
Copy code
Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':common:podDebugFrameworkIosFat' and [configuration ':common:debugFrameworkIosFat'] contain identical attribute sets. Consider adding an additional attribute to one of the configuration
I've no clue.
j
Do you have an
XCFramework()
or
binaries { framework { ... } }
block in your build configuration? The CocoaPods plugin has its own framework building Gradle tasks, which conflict with these. You should remove those and use the CocoaPods plugin's tasks. If you really need them both, you can disambiguate the tasks by adding a unique attribute to one of them. There's a YouTrack issue with an example of this.
i
Please remove xcframework/fat framework config block and config only cocoapods.
j
Does that mean that I have to expose the kmm framework through cocoapods as well, or can I still build an xcframework and use that?
j
You can build an
XCFramework
with the CocoaPods plugin with the
podPublishXCFramework
Gradle task.