I tried to find out what this means but couldnt fi...
# compose-ios
j
I tried to find out what this means but couldnt find anything, so I ask here:
Copy code
Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: ComposeApp. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
I get this from task
> Task :composeApp:linkReleaseFrameworkIosArm64 FAILED
in any sample project from kmp.jetbrains.com What bundle id should be inserted where? In general I am very very confused by iOS compile errors, almost zero information everytime something fails. Maybe there is some debug flags I can add?
c
I see this as well but it doesn't stop my build. I mean my build continues and I can install and run the app just fine.
j
Yeah this is me trying hunt down every single warning I get (Going to treat all warnings as errors in gradle if I can soon) 🙂 It can compile as well, but differ between release vs debug builds, where I think some things will brick. When I do clean rebuild I get errors and warnings, but it still says successful ... And next time doing incremental build it works. Very confusing :S Tried follow https://youtrack.jetbrains.com/issue/KT-56152 but without luck.
d
j
Thanks, I have the bundleId in my
iosApp/Configuration/Config.xcconfig
file but doesnt look like CMP respect it in newer 1.6.0-rc01+ versions, or fails parsing it, not sure.
k
Yeah, it doesn't automatically parse from iOS config files. You can use (as was mentioned above) the
binaryOption
function or if you're having trouble with the
binaryOption(...)
function:
Copy code
binaries {
    compilerOptions.freeCompilerArgs.add("-Xbinary=bundleId=<your-bundle-id>")
}
Pay attention that this id should not be identical to your iOS application's bundle id, e.g. in my case the iOS application's bundle id is
com.kenkoro.practice.ios
, and the bundle id I provided as a compiler option is
com.kenkoro.practice
. Otherwise, you'll get the error on the image. For a project reference, see this. Hope it helps!
377 Views