Hi everyone, I am stuck at the step of generating ...
# multiplatform
m
Hi everyone, I am stuck at the step of generating the frameworks for iOS in both debug & release. I read here that the Gradle script “creates a debug and release version for every framework target.” How to generate the these frameworks? https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html
s
By looking into
packForXCode
source, one could detect that to generate debug or release framework it should be enough to pass
-PXCODE_CONFIGURATION=debug
or
release
correspondingly.
m
Thanks @svyatoslav.scherbina, Should I have to run
packForXCode
from Android studio for example in order to generate the frameworks?
s
packForXCode
task can be run as any other Gradle task, e.g. using Android Studio or IntelliJ IDEA Gradle support, from command line etc.
m
I mean this is the only method for generating the iOS framework by calling
packForXCode
?
s
No, you can run other tasks instead. Please refer to
packForXCode
source code.
s
packForXcode is meant to be called from an xcode build script
m
Hey @Steven, what if I want to deliver it to external developers outside my company? Should I make an Xcode project just for building this framework?
s
i think you could use packForXcode inside a terminal, as long as you know the parameters needed to run the function. In this case, you would only need to specify "XCODE_CONFIGURATION" (it should be DEBUG ou RELEASE). I'm not sure exactly how to do that inside a terminal though
m
thanks @Steven