https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

dallas

11/13/2023, 4:24 PM
I'm running through the getting-started for Kotlin Multiplatform with Compose, have built my project using the linked Wizard, downloaded, and trying to run from Android Studio but getting the following...
Copy code
ld: framework 'composeApp' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
the run configuration was already there for me -- didn't set one up myself... and I did open Xcode before running. Android (composeApp) runs fine Any ideas?
p

Pablichjenkov

11/13/2023, 5:43 PM
Did you set "search framework path" and "other linker flags" in your Xcode build settings?
d

dallas

11/13/2023, 5:43 PM
I didn't change anything in Xcode, no
I don't see that in the docs, but I found the setting for the first one you mentioned and it has this:
p

Pablichjenkov

11/13/2023, 5:54 PM
That one looks good
d

dallas

11/13/2023, 5:55 PM
image.png
This was all set up by the Wizard from the thing I linked. A friend of mine cloned my repo and ran this from Xcode just fine 😐
p

Pablichjenkov

11/13/2023, 5:55 PM
I believe that should work.
d

dallas

11/13/2023, 5:56 PM
Same Xcode version. I'm on Sonoma he's on Ventura
p

Pablichjenkov

11/13/2023, 5:58 PM
Ahh well, in such a case perhaps it is something else. Perhaps something changed and you don't need to specify where to search for the xcframework anymore.
Are you able to run it from xCode?
d

dallas

11/13/2023, 6:00 PM
Nope, basically same error
image.png
p

Pablichjenkov

11/13/2023, 6:01 PM
Humm, it seems like due to some problem it is not able to compile it. There is no other error before?
d

dallas

11/13/2023, 6:02 PM
One sec I'll post the whole gist
p

Pablichjenkov

11/13/2023, 6:02 PM
Are you able to see a
/build
directory inside your module
d

dallas

11/13/2023, 6:03 PM
p

Pablichjenkov

11/13/2023, 6:03 PM
Sometimes Xcode complains because I have not setup my provision profile
d

dallas

11/13/2023, 6:03 PM
Inside which module, sorry
composeApp?
or iosApp?
I have
composeApp/build
inside there,
xcode-frameworks
Is the provisioning profile just for installing on real devices?
p

Pablichjenkov

11/13/2023, 6:14 PM
Can you try a different device version. I believe there was some issues with iPhone 17
Try a simulator that runs Xcode 16
d

dallas

11/13/2023, 6:16 PM
Well my buddy is using the same version of Xcode (15.0.1)
I'm downloading iOS 16.4 sim now
p

Pablichjenkov

11/13/2023, 6:22 PM
Xcode 15 is fine I think is the latest iOS version the one having some issues.
d

dallas

11/13/2023, 6:25 PM
Same issue on 16.4
p

Pablichjenkov

11/13/2023, 6:25 PM
In the logs you posted I don't see anything relevant. I think it shows your java home empty but not sure if that is relevant.
d

dallas

11/13/2023, 6:26 PM
Yeah the only relevant thing I saw was the error at the bottom about composeApp
And of course again, Android runs fine 😕
p

Pablichjenkov

11/13/2023, 6:26 PM
Same issue on 16.4
Ouch, well, wait to see if someone from JB takes a look into it
d

dallas

11/14/2023, 12:21 AM
I think I've figured it out -- at least what the problem is but not the root of the problem which I assume is a config problem somewhere in the wizard. I have a case-sensitive filesystem for my projects on my mac and I think somewhere the configuration is
ComposeApp
vs.
composeApp
This, I think, is a bug in the wizard
Changing to a case-insensitive filesystem allowed me to run the iOS app without issue.
👀 1
p

Pablichjenkov

11/14/2023, 5:28 AM
Humm, interesting. good finding. Usually the framework name is defined using:
Copy code
iosTarget.binaries {
            framework {
                baseName = "MyFrameworkNameKt"
                isStatic = true
            }
        }
Hopefully you find where is the misspell because I guess someone else will run into the same problem if clone your code.
☝️ 1
7 Views