Hi, anyone who would know how to properly build th...
# compose-ios
j
Hi, anyone who would know how to properly build the ios project from terminal (on CI) ? No matter what I try, looks like I have to always open the xcode 🤷‍♂️ once
👍 1
I was trying a.
./gradlew generateDummyFramework
b.
./gradlew shared:podspec
c.
pod install
(from iosApp dir) d.
xcodebuild -workspace appIos.xcworkspace/ -scheme appIos build
(from iosApp dir) taken from this convo https://slack-chats.kotlinlang.org/t/10507374/in-the-https-github-com-jetbrains-compose-multiplatform-temp however the step d, xcode build fails with error about my Shared module doesn't exists.... if I do also following steps • open xcode • build in xcode (fails) • pod install • build in xcode works fine I've tried to do e. pod install f. xcodebuild again, but that doesn't help either... so opening xcode and building it from it has to do some missing step, but no idea what it is... 😕
l
It looks like you don't actually build shared. The dummy framework is just for xcode to know there's something there in an early step. Try to build shared before the podspec step.
j
my understanding is that xcode itself is calling gradle to build it, so I'd expect that extra build step is not necessary...
anyway, would it be just
:shared:build
? or any better task to run ?
l
I'd try build (or assemble if you want to skip tests). I remember having to run a few tasks for xcode to build properly, but I don't remember all of it.
j
trying assemble, though what I can see it's running
Copy code
...
:shared:linkPodDebugFrameworkIosArm64 SKIPPED
:shared:linkPodDebugFrameworkIosX64 SKIPPED
:shared:linkPodDebugFrameworkIosFat SKIPPED
:shared:linkPodDebugFrameworkIosSimulatorArm64 SKIPPED
:shared:linkPodReleaseFrameworkIosArm64 SKIPPED
:shared:linkPodReleaseFrameworkIosX64 SKIPPED
:shared:linkPodReleaseFrameworkIosFat SKIPPED
:shared:linkPodReleaseFrameworkIosSimulatorArm64 SKIPPED
:shared:assemble SKIPPED
it's building all variants which will be probably quite time consuming
l
You can run the linkPod* tasks individually. They'll build the binary for the specific platform.
j
thanks a lot, I'll give it a try... I'm still not totally sure why is this step necessary though... xcodebuild logs clearly show gradle tasks being executed... also none of this is necessary if I just run it from xcode directly
actually it does work now, (after calling
pod install
again)
l
I think I remember having to call pod install twice. I just had it pipe the first into dev null and use the second one as the 'real' install.
j
thanks again 👍