Hello, Follow the official guide. Or create a new ...
# multiplatform
f
Hello, Follow the official guide. Or create a new KMP app from a project template of Android Studio to see an example of iOS integraition
p
Unfortunately, it happened also to me sometimes. When it does use XCode.
f
Some tips : reduce the exported content to iOS by controlling the content visibility with explicitAPI. If your database schema is big, move the implementation outside the module. Use isStatic = false, it may reduce the build time.
t
I actually did everything you suggested except for the database (it's tiny). My project was built following the guide. I also tried redoing the iosApp part by following the make your KMP app runnable on iOS guide. I will try again today with a more rested mind/body. Felt like I was about to pass out last night.
Thanks for the tips. Will keep this thread updated.
f
Did linkDebugFrameworkIosArm64 fast? You can also remove IosX64, if you’re working on macOS ARM.
t
So, the steps i followed to manage to build and run : • Didn't mention it but i had to adjust the heap sizes (had errors at first) • To get rid of the binary warning thing, i added this line :
Copy code
binaryOption("bundleId", "com.bakjoul.tsbuilder.composeApp")
• Added run permission to gradlew inside the project root directory • Made sure Koin was initialized • Added -lsqlite3 to Other Link Flags for SqlDelight I ran iosArm64Binaries to make it work, on the first build it takes ~3 minutes. I guess i can just run the debug task to build faster.
f
Yes, you must work on debug and deliver on release
t
16gb of ram is very limited though, i wouldn't advise it
f
but, release shouldn’t take 1H. I don’t know the content of your project, So I can’t say why...
16gb is enough for working
t
it's fixed i think (?), like a i said, when i run the iosArm64Binaries, it also runs linkReleaseFrameworkIosArm64. This one was still running after 1 hour yesterday but i believe it was due to bad configuration
Can't do anything more. Ram is almost full with AS, Xcode and a simulator, and the OS can feel slow when it's reaching 15gb, but it's just my personal feeling.
We're not always building though so it's okay. Just not as comfortable as having 32gb (which i'm used to).
Thank you guys for replying and helping me. 🙏🏻
t
linkDebugFrameworkIosSimulatorArm64 takes less than 10 seconds. and pretty much the same for linkDebugFrameworkIosArm64 !
b
Curious if there's any concerns I should have using sqldelight 2.1.0-SNAPSHOT in production