In the <compose multiplatform template>, is it req...
# compose-ios
a
In the compose multiplatform template, is it required that the project must be opened in the IDE first before the iOS app can be built via terminal? 🤔
j
is there a message why it failed?
j
Run generateDummyFramework first
a
That worked like a charm, thanks!
j
We add it to our cocoapod so it happens on pod install. I keep meaning to send a PR to Kotlin so that it gets added automatically (it means we can't use automatic generation). https://github.com/cashapp/redwood/blob/trunk/samples/emoji-search/ios-shared/EmojiSearchKt.podspec#L24-L26
a
Ah nice, yea that would be super useful. I’m assuming a Gradle sync from Android Studio runs generateDummyFramework for you. I’m also assuming this is why the readme in the compose multiplatform template says to reopen the project after running ./cleanup.sh
j
I haven't seen what the template does, but it's generally not a problem for Android. Unless you're saying you launch the iOS app from Studio which is maybe a thing that's supported? We use Xcode
a
Yep, I launched the iOS app directly from studio. The cleanup script from the template does this:
Copy code
#!/bin/sh
rm -rf .idea
./gradlew clean
rm -rf .gradle
rm -rf build
rm -rf */build
rm -rf iosApp/iosApp.xcworkspace
rm -rf iosApp/Pods
rm -rf iosApp/iosApp.xcodeproj/project.xcworkspace
rm -rf iosApp/iosApp.xcodeproj/xcuserdata
Which means before running the iOS app you either: 1. reopen the project (as the documentation says), which will just.. 👇 2. do a Gradle sync 3. do what you suggested before
xcodebuild
a.
./gradlew generateDummyFramework
b.
./gradlew shared:podspec
c.
pod install
(from iosApp dir) d.
xcodebuild...
(from iosApp dir)
c
tangent, but is cocoapods still popular? i thought most folks already went spm
j
I would say it's probably 100x to 1000x more popular in pratice, yes
a
I missed a step above (
./gradlew shared:podspec
), I’ve updated ^
The shared module's podspec isn't removed with the cleanup script, but it is generated on a gradle sync, so it's only relevant for fresh checkouts, from CI for example
141 Views