bdeg
03/05/2019, 10:04 PMbasher
03/05/2019, 10:43 PMbasher
03/05/2019, 10:44 PMankushg
03/06/2019, 12:55 AMbasher
03/06/2019, 12:56 AMbasher
03/06/2019, 12:57 AMkpgalligan
03/06/2019, 1:57 AMbdeg
03/06/2019, 4:31 AMolonho
03/06/2019, 7:05 AMsvyatoslav.scherbina
03/06/2019, 7:18 AMYou can publish separately, and then in module B add A’s spec as a dependencyHaving two K/N frameworks in one project is still not possible. So the approach is to compile all Kotlin modules to single framework.
olonho
03/06/2019, 7:24 AMbasher
03/06/2019, 4:27 PMankushg
03/06/2019, 7:07 PMankushg
03/09/2019, 1:25 AMankushg
03/18/2019, 6:09 PMolonho
03/18/2019, 6:24 PMankushg
03/18/2019, 11:45 PMilya.matveev
03/19/2019, 5:32 AMankushg
03/19/2019, 4:20 PMsvyatoslav.scherbina
03/20/2019, 7:36 AMankushg
03/21/2019, 12:05 AMlipo
to make a fat framework from iosArm32
, iosArm64
, and iosX64
(for the simulator)
One of the important things we realized in our own custom gradle tasks is that after using lipo
to merge the framework binaries, we also needed to specifically use the Info.plist
from the iosArm32
build. If we didn't, Apple's app thinning could result in having the 32bit framework stripped out (and then crashing on some 32-bit devices).svyatoslav.scherbina
03/21/2019, 6:41 AMInfo.plist
from iosArm32
?ankushg
03/21/2019, 2:47 PMankushg
03/21/2019, 4:01 PMarmv7
Include this key if your app is compiled only for the armv7 instruction set, or if it’s a 32/64-bit universal app.Looks like Apple should properly handle the case where we have a universal framework declared with arm7 in the plist!
basher
03/21/2019, 4:07 PM/usr/libexec/PlistBuddy
to modify the plist in your gradle task, if there are changes you need to make thereankushg
03/21/2019, 4:16 PMsvyatoslav.scherbina
03/22/2019, 7:57 AMUIRequiredDeviceCapabilities
key is removed)ankushg
03/22/2019, 2:59 PMilya.matveev
04/05/2019, 1:09 PMankushg
04/08/2019, 4:33 PMilya.matveev
04/09/2019, 10:58 AMplugins {
id("org.jetbrains.kotlin.multiplatform")
id("org.jetbrains.kotlin.native.cocoapods")
}
kotlin {
sourceSets["commonMain"].dependencies {
api(project(":another-module-1"))
api(project(":another-module-2"))
// ...
}
// Use configure(listOf(<targets>)) if you want to configure some specific targets.
targets.withType(KotlinNativeTarget::class).all {
// The CocoaPods plugin has already created both debug and release frameworks.
val debugFramework = binaries.getFramework("DEBUG")
val releaseFramework = binaries.getFramework("RELEASE")
// Export the dependencies in the frameworks.
configure(listOf(debugFramework, releaseFramework)) {
export(project(":another-module-1"))
export(project(":another-module-2"))
// ...
}
}
}