Hello folks, I have a question that is related to ...
# touchlab-tools
n
Hello folks, I have a question that is related to Skie. With Skie adding Swift code to KMP frameworks, this becomes relevant to reduce their final size. I’m curious if anyone has done it already for their framework. I tried to slap something together but the issue I’m facing is this: if I do the stripping after my framework is assembled, this modifies the output of the assembly task, meaning it will be always re-run in the next build, and then stripped again, the cycle continues. What could be a way around that? A broader question: would this make a good configuration option for Skie itself?
to give you some numbers, here’s the size difference of one of our production Skie-flavored KMP frameworks: • before: 22140576 bytes • after: 15757400 bytes
d
Have you checked whether Xcode/xcodebuild strips embedded frameworks automatically when exporting a release build of the app by any chance? Not sure about it, but worth a try.
n
@Daniel Seither it doesn’t seem like it does.
d
That's a shame, but thanks for checking. Then, release builds of frameworks should produce a stripped binary + dSYMs with debug symbols nod
t
Did you check the release build that’s exported using the distribution? Xcode is doing a lot of stripping at the distribution phase that’s not running when you just build release. I would expect Xcode to strip everything it can in that phase because this would be important for other dependencies. In any case, SKIE doesn’t really do linking and stripping, so you can take a look at the Kotlin/Native compiler to see if there’s a way to add parameters for its
strip
invocation.
n
@Tadeas Kriz the IPA I was looking at was generated by
xcodebuild -exportArchive ...
with
"method": "app-store"
in
exportOptionsPlist
t
Hm, that should run the extra stripping, that's weird. Could you share the export log?
n
@Tadeas Kriz looks like we haven’t been preserving it in our deployment jobs, will do from now on 😓