Hey everyone :wave: I am working on a pretty simp...
# compose-ios
a
Hey everyone ๐Ÿ‘‹ I am working on a pretty simple Compose multiplatform app with iOS support based off the template project. After updating to Compose 1.5.0 I cannot get past this pesky iOS issue. See ๐Ÿงต
Copy code
/Users/aaron/Development/compose-lightsaber/iosApp/iosApp/ContentView.swift:7:9: error: cannot find 'Main_iosKt' in scope
        Main_iosKt.MainViewController()
        ^~~~~~~~~~
The only two things I changed were updating to 1.5.0 and I moved the
main.ios.kt
to a different directory in the same module ๐Ÿ˜…
I tried running the
cleanup.sh
script, running
./gradlew shared:embedAndSignPodAppleFrameworkForXcode
in Xcode, but nothing seems to make that
main.ios.kt
file visible in ContentView.swift ๐Ÿค”
I tried moving the main.ios.kt file back where I had it, but I can't seem to break out of this broken state. My android app seems to work fine.
Thanks! ๐Ÿ™
r
It seems your ios shared module isn't getting compiled.
a
And not available in the iosApp module.
This seems to run fine
./gradlew shared:compileKotlinIosSimulatorArm64
r
I've had similar issues in the past where that command only takes about 4 seconds to run but actually does nothing
a
interesting, trying this now
./gradlew shared:iosSimulatorArm64Binaries
the task succeeds, but i still can't build the app ๐Ÿ˜“
r
how long does it take
a
Copy code
./gradlew shared:iosSimulatorArm64Binaries     
Configuration 'kspKotlinIosSimulatorArm64ProcessorClasspath' was resolved during configuration time.
This is a build performance and scalability issue.
See <https://github.com/gradle/gradle/issues/2298>
Run with --info for a stacktrace.

BUILD SUCCESSFUL in 2m 17s
4 actionable tasks: 2 executed, 2 up-to-date
โžœ  compose-lightsaber git:(main)
2 minutes
r
Are you using cocoapods
a
yes
Copy code
cocoapods {
        version = "1.0.0"
        summary = "a summary"
        homepage = "insert link"
        ios.deploymentTarget = "14.1"
        podfile = project.file("../iosApp/Podfile")
        framework {
            baseName = "shared"
            isStatic = true
        }
    }
r
In your
build
folder do you see the build outputs
image.png
a
I do and there is the API i'm trying to call ๐Ÿ˜…
Basically, after opening the
*.xcworkspace
file I was able to build in xcode just fine
Wow SAME exact problem. Thank you so much @kpgalligan and @julioromano ๐Ÿ™
๐Ÿ™Œ 1