AlecKazakova/kotlin-native-cocoapods

Override cocoapods preset doesn't work

AlecKazakova opened this issue · 3 comments

binaries {
                framework {
                    baseName = "StihlConnect"
                }
            }

it seems
compilations.main.extraOpts '-module-name', 'SC'
isn't applied as well

where are you placing that code in your build.gradle?

targetFromPreset(cocoapodsPreset, 'native') {
            compilations.main.extraOpts '-module-name', 'SC'
            binaries {
                framework {
                    baseName = "StihlConnect"
                }
            }
        }

it used to be in fromPreset(presets.iosArm64, 'iosArm64') and in the other targets as well.
The first line is useful for adding a custom class prefix for Objective C whereas the other one was needed as the generated framework name always ignored the rootProject.name that I set and was called e.g. "main.framework" or "common.framework".

This cocoapods plugin however actually does honor the rootProject.name so the second use case might not be needed anymore.