KMP project. Does anyone know how to optimize builds for iOS / Xcode? This is what I'm getting for a little change in the same shared feature module :( Same on local.
@amasikel what is 'Build iOS ' doing? Just building, or testing as well? How many CPU architectures does it build for? What are the Gradle tasks that get invoked?
@amasikel how about a chat? :)
@mreichelt sure! I can share my ci YAML if needed

@mreichelt

- name: πŸ‘· Build iOS App
timeout-minutes: 45
shell: bash
run: |
echo "πŸ“¦ Building iOS with BUILD_TYPE='$BUILD_TYPE'"
set -euo pipefail

PROJECT_PATH="apps/ios/woopzi.xcodeproj"

xcodebuild -project "$PROJECT_PATH" \
-scheme "$BUILD_TYPE" \
-configuration "$BUILD_TYPE" \
-destination generic/platform=iOS \
build \
CODE_SIGNING_ALLOWED=NO

@mreichelt my build phases. Thanks for your help :)
@amasikel Thanks! Looks good so far, nothing stands out. I guess we would need to dig a bit deeper.
Checking what things are downloaded every time, checking the used versions (new versions tend to bring optimisations), and adding some cache maybe.
@mreichelt Thanks! By cache you mean Gradle cache? Cause I'm doing that already :( I'm not too familiar with iOS and xcode yet so maybe there are some optimizations to be done on this side?
@amasikel yep, I meant that. Good question - I think the interesting parts is to look where the majority of the time is spent. Is it downloads? Is it compiling KMP? Or is it Swift? Lots of details :)
@amasikel another good question, if you have Gradle build cache turned on: how many cache hits do you get? Which tasks had to be rerun?
Download+upload time for the cache can also be something to look into.
@amasikel also: are you using Kotlin 2.3 yet?
Just remembered this: https://youtu.be/W-okSVrl25M
Faster Native Builds in Kotlin 2.3

YouTube
@mreichelt yes I am! But maybe I missed a few optimizations. I'll check out the video. Thanks!