hi how to set bundle id for iOS framework , I'm tr...
# multiplatform
a
hi how to set bundle id for iOS framework , I'm trying to silence this warning
Copy code
w: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: <>. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
p
Hi Ahmed, how did you set up your KMP project?
a
something like this, using cocoapods
Copy code
kotlin {
    androidTarget {
        publishLibraryVariants("release")
    }
    iosX64()
    iosArm64()
    iosSimulatorArm64()

    cocoapods {
        // Required properties
        // Specify the required Pod version here. Otherwise, the Gradle project version is used.
        version = "0.0.1"
        ios.deploymentTarget = "12.0"
        name = "myFramework"
        framework {
            baseName = "myFramework"
            isStatic = false
            transitiveExport = false
            embedBitcode(org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode.DISABLE)
        }
    }
}
p
No, I mean - did you use KMM plugin, or kmp.jetbrains.com's wizards, or did you set things up yourself?
a
i used android studio plugin
p
I'm going to try to create a project the same way and see if I can reproduce the error 🙂
🙏 1
Ok, did you create it with the most recent plugin (0.8.1)? It was released early Nov...
a
i did create it 1 year back , not sure what was the version i'll try to use the new one too , and see if warning is shown it's not blocking anything just wondering why it's needed and how to resolve
p
I think that's a great idea
I just created a project, I'm not seeing that warning. If you want to manually set it, I think you can use Xcode (General -> Identity -> Bundle Identifier).
👀 1
But I think the best is to recreate the project, then you have all the latest developments and setup.
👍 1
j
I've seen this same error compiling my library recently, seems like it started after a recent Kotlin version update. I haven't had a chance to look into it, as it hasn't caused any issue other than the warning logs.