https://kotlinlang.org logo
Title
m

Michal Klimczak

08/12/2022, 9:41 AM
Which options of building the framework for ios are currently state of the art and which are not?: •
assembleXCFramework
embedAndSignAppleFrameworkForXcode
packForXCode
- this is deprecated afaik • cocoapods Any bigger issues with any of these methods?
c

cagdas

08/12/2022, 3:14 PM
We currently have a monorepo app with 2 targets (Dev / Release). For the Dev target, we use
embedAndSignAppleFrameworkForXcode
This builds for single architecture and fast enough while developing. For the Release Target (on the CI machine), we use
assembleXCFramework
and embed the XCFramework. This of course takes longer, but builds a proper xcframework for all archs.
m

Michal Klimczak

08/12/2022, 3:16 PM
That's smart! I use xcframwork and itbtakes too much time, will explore your approach
p

Paul Woitaschek

08/14/2022, 2:32 PM
@Miguel Schulz maybe that will work for us as well? ☝️
g

Gillian Buijs

08/14/2022, 2:48 PM
Using assembleXCFramework solved all issues for me so I'd definitely recommend that one. I had issues with both packForXcode and building a fat framework where it would work on M1 but not Intel macs and vice versa or work on real devices but not simulator.
m

Michal Klimczak

08/14/2022, 2:53 PM
I'm kind of rather looking for all the options people are using nowadays than the best option there. There's a user of Koru who uses embedAndSign... and it doesn't trigger a ksp step for him somehow. Not sure why happens there yet, but at the same moment I'm trying to anticipate other issues with other methods
m

Mustafa Ozhan

08/14/2022, 2:56 PM
embedAndSignAppleFrameworkForXcode
can be problematic for publishing the final IPA into app store since it embeds and sign the final framework
g

Gillian Buijs

08/14/2022, 2:57 PM
Well my project is pretty complicated as it combines flutter and multiplatform which brings all kinds of issues. So for what it's worth XCFramework was the only reliable option for me. Anything iOS isn't trivial anyway...
m

Michal Klimczak

08/14/2022, 2:57 PM
Why is signing and embedding a problem? Final ipa should be signed again by app store anyway
m

Mustafa Ozhan

08/14/2022, 3:00 PM
Why is signing and embedding a problem? Final ipa should be signed again by app store anyway
That’s true final IPA should be signed, but not any other framework included inside that IPA, you will probably get this one: https://kotlinlang.slack.com/archives/C3PQML5NU/p1658418868118959