Bradleycorn
11/21/2023, 4:05 PMnative.cocoapods
plugin, we can set the native build type based on the Xcode configuration, like this:
xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
I’m wondering if the build type is set before or after the cocoapods.framework
block is setup.
What I’m trying to do is setup the linking based on the build type (dynamic linking for debug builds, static linking for release builds).
Wondering if something like this would work???
cocoapods {
// Required properties here...
// Maps custom Xcode configuration to NativeBuildType
xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
framework {
// Required properties here ...
isStatic = (buildType == RELEASE)
}
}
a-dd
11/21/2023, 7:09 PMisStatic = xcodeConfigurationToNativeBuildType[property(KotlinCocoapodsPlugin.CONFIGURATION_PROPERTY)] == NativeBuildType.RELEASE
a-dd
11/21/2023, 7:10 PM