Felipe Sáez
02/04/2022, 2:49 PMpodspec
is created which generates a podpsec
file which points to a .framework
file located in build/cocoapods/framework/shared.framework
. Even though it’s mentioned there that an XCFramework is built, I don’t know what gradle task we are supposed to run. When running ./gradlew tasks --all
I don’t see any XCFramework related task. So here some questions about the CocoaPods integration:
a. What’s the right way to get a framework that can be used for production considering that I won’t release an app but a framework and that I want to include multiple architecture slices (iOS simulator, iOS device, tvOS simulator, tvOS device)?
b. Is it possible to get an XCFramework only using the CocoaPods integration?
2. On the other hand, when choosing XCFramework from the wizard only Debug
and Release
build types/configurations are available and there doesn’t seem to be an option to add more. Here some questions regarding the XCFramework integration:
a. What’s the right way to work for development? Do we need to generate a new XCFramework every time we make a change?
b. If the existing framework does not exclude i386 architecture, I will get an error regarding this missing architecture. Does KMM not support i386? The existing framework supports iOS 9 which apparently seems to force the i386 architecture. The architectures property in build settings is set to standard (ARCHS = “$(ARCHS_STANDARD)“).
Maybe the right setup should combine both? If so what would be the right way to do this?
I’ve tried quite a few different approaches and the best I’ve found so far is to use the org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
function/initializer which doesn’t allow me to use custom build configurations (Test, Preprod). Neither does the XCFrameworkConfig
class.
I hope I’m being clear and I hope to be asking the right questions.
Have a great weekend.
CheersViacheslav Kormushkin
02/07/2022, 7:56 AMFelipe Sáez
02/07/2022, 11:52 AMViacheslav Kormushkin
02/07/2022, 1:47 PMFelipe Sáez
02/07/2022, 4:20 PMembedAndSignAppleFramework
Gradle task? Should it be a Build Phase
script?
2. When using the embedAndSignAppleFramework
task, how exactly should the framework be added to the framework target
on Xcode?
3. Where could I find more documentation regarding the embedAndSignAppleFramework
task?
Cheers!Viacheslav Kormushkin
02/08/2022, 8:25 AMFelipe Sáez
02/08/2022, 1:17 PM