Adrian Witaszak
12/07/2022, 9:11 AMXCFramework,
which later is copied to another directory and used by React UI layer.
Initially, we were using assembleXCFramework
which took 3m 30s.
Then I changed it to assembleSharedReleaseXCFramework
and the build time decreased to 2m 15s, which is already great. XCFramework
generated, files copied all run fine.
But the assembleSharedReleaseXCFramework
still runs both tasks linkReleaseFrameworkIosX64
and linkReleaseFrameworkIosArm64
, which take about 65s each.
• We are all on MacBooks M1 in our team. Would you happen to know if we need both tasks to run?
• If I skip linkReleaseFrameworkIosX64
by adding -x linkReleaseFrameworkIosX64
, it runs the first task, but the job fails because XCFramework
is not generated.
• Do you think this is the right approach, or do you have suggestions?Nikolay Kasyanov
12/07/2022, 9:19 AMAdrian Witaszak
12/07/2022, 9:20 AMNikolay Kasyanov
12/07/2022, 9:20 AMios()
shortcut and simply don’t configure the x64 one, you should get what you’re looking for. Not sure if it’s the best approach though.Adrian Witaszak
12/07/2022, 2:52 PMios {
binaries.framework {
baseName = "shared"
// Add only iosArm64 to the XCFramework
if (this@ios.equals(iosArm64())) {
xcf.add(this)
}
}
}
It worked as well by only changing ios {...}
to iosArm64 {...}
but I thought it may be safer to keep iOS if we want to run a normal iOS app on intel processors later.kpgalligan
12/08/2022, 2:33 PMiosArm64("ios") {
binaries.framework {
baseName = "shared"
}
}